If no bound is given for a type variable, Object is assumed.
Found in your link. That means that given FirstClass<T extends String>
and SecondClass<V>
you get that:
- Class:
FirstClass
Type Parameter: T extends String
. Type Variable: T
. Type Bound: String
.
- Class:
SecondClass
Type Parameter: V
Type Variable: V
. Type Bound: defaults to Object
.
Edit: By Type Parameter, Type Variable and Type Bound I do not mean the grammar rule, but the concept. Therefore, extends
is just the keyword.
About the leftmost bound you can find the answer in the same link, two sentences after the first quote:
The order of types in a bound is only significant in that the erasure of a type variable is determined by the first type in its bound, and that a class type or type variable may only appear in the first position.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…