innerclass

    • inner class

    • method inner class

    • anonymous inner class

    • static inner class

Inner classes

    • Inside Knight object of inner class can be instantiated directly.

    • Outside the Knight object of inner class can be instantiated using an instance of Knight.

    • Just as other member of Knight the inner class KnightAdrenaline it has access to other members of Knight .

    • Refers to the outer class instance as Knight.this