Java Reference
In-Depth Information
show the declaration of a class called
MyClass
that implements
IGenIF
.
The solution is
type.
To obtain
Counter<T>
's raw type, simply use its name without any type specifica-
tion, as shown here:
11
.
Do type parameters exist at run time?
No. All type parameters are erased during compilation, and appropriate casts are sub-
stituted. This process is called erasure.
ic. In the process, create a stack interface called
IGenStack
that generically defines
the operations
push( )
and
pop( )
.