auto binding (type inference) of generic types by the compiler
问题 the following code has compilation error in the line of t3: public <E> List<E> getList() { return new ArrayList<E>(); } public <T> void first() { List<T> ret = new ArrayList<T>(); List<T> list = getList(); T t1 = ret.get(0); T t2 = list.get(0); T t3 = getList().get(0); } The error message is: Type mismatch: cannot convert from Object to T I know I can fix the problem using casting or manual binding, my questions is: is it so difficult for the compiler to do auto-binding, is there a case that