Generics


Generic Types are Invariant - List<String> is not a subtype of List<Object>

Arrays are Covariant  - String[] is a subtype of Object[]



Reifiable Type - A Type whose Type-Information is available at runtime. primitives, non-generic types, raw types, and invocations of unbound wildcards



Non-Reifiable Type - A Type whose Type-Information is NOT available at runtime. It has been removed at compile-time by type erasure.
Generic types that are not defined as unbounded wildcards



Mutually Recursive Type Variable Bounds

Example :

class ReprChange<T implements ConvertibleTo<S>,S implements ConvertibleTo<T>>


An inner class is a nested class that is not explicitly or implicitly declared
static.Inner classes may not declare static members, unless they are compile-time
constant fields. Member interfaces are always implicitly static so they
are never considered to be inner classes.


Types of Inner Classes - Local, Anonymous, Non-Static, Static ( this is not really inner class just nested class )

No comments:

Post a Comment