Chapter 13. Generic Class Types

Generic class types are not a separate capability from the class and interface types that you have seen in earlier chapters. The facility for defining generic class and interface types is an extension of the ordinary definition of classes and interfaces that you are already familiar with that enables you to define families of classes and interfaces. In this chapter you will learn:

  • What a generic type is

  • How you define a generic type

  • How you specify type parameters for a generic type

  • What parameter type bounds are and how you use them

  • What wildcard type specifications are and how you use them

  • How you define bounds for a wildcard

  • How you define and use parameterized methods

Get Ivor Horton's Beginning Java™ 2, JDK™ 5th Edition now with O’Reilly online learning.

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