java generics

Generics: The data type to be manipulated is formulated as a parameter. This parameter type can be used in the creation of classes, interfaces, and methods, which are called generic classes, generic interfaces, and generic methods, respectively.
Generic parameter types can use the extends statement, such as <T extends superclass>. customarily called " Bounded Type"
Generic parameter types can also be Wildcard type. For example Class<?> classType = Class.forName("java.lang.String");
 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325019485&siteId=291194637