What is the difference between a Class
and a Class>
declaration.
Class a;
Class> b;
>
Class javadoc:
Type Parameters:
T
- the type of the class modeled by thisClass
object. For example, the type ofString.class
isClass
. UseClass>
if the class being modeled is unknown.
Use of Class
without the type parameter is similar to using any generic class (Map
, List
, etc.) without the type parameter - either it's a pre-1.5 legacy usage or it's just a segment of code that does not care about unchecked type casting.