Java difference in List and List of

List <T> refers generally to a generic case, for example: List <String> represents the set of parameters of type String.

The List <?> Use is a collection of generic uncertainty in return is a way what type of case used. ? Representation is unrestricted wildcard. Parameters can be of any type.

List<T> list =new List<T>();

T t = new T();

T may be repeated use in the same class, and? We can not achieve this effect.

Guess you like

Origin www.cnblogs.com/syaaa/p/11242445.html