O'Reilly logo

The Java® Language Specification, Java SE 7 Edition, Fourth Edition by Alex Buckley, Gilad Bracha, Guy Steele, Bill Joy, James Gosling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required