The main reason for increasing the generic mechanism in 1.Java SE 5.0 was to meet one of the earliest Java specification requirements developed in 1999 (JSR 14).
2. Program code written using the generic mechanism has better security and readability than the clutter of code that uses the object variable and then enforces the type conversion.
3. The charm of type parameters is: Make the program more readable and secure
4. Generic methods can be defined in a normal class or in a generic class
5. Generics can not only limit downward, such as < Extends Collection>, can also limit upward, such as <? Super Double>, which indicates that a type can accept only Double and its upper-parent class type, such as number, an instance of type object.
6. A type variable or wildcard can have multiple qualifications, for example: T extends comparable & Serializable
7. Virtual machine Heavy No generics, only common classes and methods
8. All type parameters have their qualified type substitution
9. Bridge method is synthesized to protect polymorphic
type erase : Whenever a generic type is defined, it automatically provides a corresponding primitive type (raw type). The name of the original type is the generic type name after the type parameter is deleted. Erase (erased) type variable and replace with qualified type (unqualified variable with object)
Java notes about generics