Duplicate :
|
|
Duplicate :
|
|
Relates :
|
See <http://forum.java.sun.com/thread.jsp?forum=316&thread=495830> class Test { static class SomeType<T> { T t = null; } static <T> T nil() { return (new SomeType<T>()).t; } public static void test() { nil().getClass(); // error: java.lang.Object cannot be dereferenced } }
|