previous | start | next

Syntax 22.1: Instantiating a Generic Class

GenericClassName<Type1, Type2, . . .>

Example:

 
ArrayList<BankAccount>
HashMap<String, Integer>

Purpose:

To supply specific types for the type variables of a generic class


previous | start | next