Generic parameter type

refer to:

http://www.weixueyuan.net/view/6321.html

http://blog.csdn.net/s10461/article/details/53941091

Pass-by-value parameters (what we usually call parameters) are surrounded by parentheses, such as (int x, double y), type parameters (generic parameters) are surrounded by angle brackets, and multiple parameters are separated by commas, such as <T> or < T, E>.

Type parameters need to be given after the class name. Once the type parameter is given, it can be used in the class. The type parameter must be a valid identifier, and it is customary to use a single uppercase letter. Typically, K is a key, V is a value, E is an exception or error, and T is a data type in general.

Guess you like

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