Class.getName()
- Particular Sytntax in Generic Programming:
- We can use
<T extends A>
to capture relationship between type in generic programming.
- We can use
<T extends A & X>
to capture that T extends both A and X. Java uses the same extends
keyword even if say, X
is an interface.
- When using array initializer
{1,2,3,4}
in generic programming→ use instead like this → by specifying type: new Integer[]{1,2,3,4}
→ otherwise java make convert it to primitive type int
which is not supported in generic types.