Next: Inner and Nested Classes:
Up: Java Notes
Previous: Nested Class
- Non-static nested class
- Associated with an instance of enclosing class
- Can access variables and methods of enclosing class directly
- Cannot have static members (refers to instance class)
- An instance of an inner class can exist only inside an instance of the enclosing class, and it has direct access to members of the enclosing class's instance; inner class is useful as an adapter class
Ananda Amatya
9/15/1999