1, you can not use a local type (such as int float) to replace the generic
2. Run-time type checking, the different types of generic classes are equivalent (Pair and Pair belong to the same type Pair), which should be paid special attention to if a instanceof pair==true does not represent A.getfirst () The return value is a string type
3. Generic classes cannot inherit exception classes, that is, generic classes cannot be thrown as exceptions
4. You cannot define a generic array
5, can not use the generic structure of objects, namely: the new T (); It's wrong.
6. Generics cannot be used in the static method, nor can generic variables be decorated with the static keyword
7. Do not define equals (T x) in generic classes because there are also equals methods in the object class, and when the generic class is erased, the two methods conflict
8. There is no relationship between multiple classes derived from the same generic class, and no value can be assigned to each other, namely:
Pair P1; Pair P2; P1=P2; This assignment is wrong.
9, if a generic class also has a non-generic class of the same name, do not mix, adhere to the use of generic classes
Pair < manager > managerbuddies = new Pair < Manager > (CEO, CFO);
Pair rawbuddies = managerbuddies;
Here the compiler does not complain, but there are serious run-time error problems.