A generic class has the facility to declare more than one type parameter. To specify two or more type parameters, simply use a comma - seperated list.
The following program explains how a generic class works with two type parameters.
Print Types CODE class GenericsDemo OUTPUT Type of T is : java.lang.Integer DESCRIPTION At THINGS TO TRY
|