difference between List and List<?> [duplicate]
问题 This question already has answers here : What's the difference between unbounded wildcard type List<?> and raw type List? (4 answers) Closed 10 months ago . I've read alot about this, and I know that: List<Object> listOfObject = new ArrayList<TYPE>(); // (0) //can only work for TYPE == Object. //if TYPE extends Object (and thus objects of type TYPE are Objects), //this is not the same with Lists: List<Type> is not a List<Object> Now I've read that the following is ok: List undefinedList = new