Restrictions on Generics


Generics can not use Primitive types

In a generic class
 can not create type parameters instances;
 can not declare static fields with type parameters;

Cannot use instaceof with parametrized types

Cannot Create Arrays of Parameterized Types

Cannot extend Throwable in generics classes

Cannot Overload a methods with parametrized types as parameters on the same place






No comments:

Post a Comment