4.4. Type Variables

A type variable is an unqualified identifier used as a type in class, interface, method, and constructor bodies.

A type variable is declared as a type parameter of a generic class declaration (§8.1.2), generic interface declaration (§9.1.2), generic method declaration (§8.4.4), or generic constructor declaration (§8.8.4).

TypeParameter:    TypeVariable TypeBoundoptTypeBound:    extends TypeVariable    extends ClassOrInterfaceType AdditionalBoundListoptAdditionalBoundList:    AdditionalBound AdditionalBoundList    AdditionalBoundAdditionalBound:    & InterfaceType

The scope of a type variable declared as a type parameter is specified in §6.3. Every type variable declared as a type parameter has a bound. If no bound is declared ...

Get The Java® Language Specification, Java SE 7 Edition, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.