Java Reference
In-Depth Information
The supertype-subtype relationship does not exist with parameterized types. For example,
Wrapper<Long>
is not
a subtype of
Wrapper<Number>
.
The generic type parameters are erased by the compiler using a process called type erasure. Therefore,
the generic type parameters are not available at runtime. For example, the runtime type of
Wrapper<Long>
and
Wrapper<String>
are the same, which is
Wrapper
.