private T clazz;
Here, clazz can contain any type that is of type Serializable, even your custom class object, if it is of type Serializable.
In this case, the name says that it is a class ( clazz ), but the value must be an object of the class.
private Class< T > clazz;
Here it is a Type Class . Class is a generic type, so here clazz can only contain a class object that is of type Serializable.
source share