From this blog entry comes this gem:
import java.util.Collection;
public class TestType {
public static <Collection> Collection myMethod(Collection a) {
return a;
}
public static void main(String ... args) {
System.out.println(myMethod("Hello World"));
}
}
Beautiful, just beautiful...
0 comments:
Post a Comment