Java weird generic return type
Posted
by drozzy
on Stack Overflow
See other posts from Stack Overflow
or by drozzy
Published on 2010-05-20T19:10:14Z
Indexed on
2010/05/20
19:20 UTC
Read the original article
Hit count: 227
java
|java-generics
Browsing through Guava libraries I saw this weird signature on a readLines method from Files class:
public static <T> T readLines(File file,
Charset charset,
LineProcessor<T> callback)
I know a little bit about generics in java, but this baffled me.
What does the double T mean here? And why is the first one in angled brackets?
© Stack Overflow or respective owner