Inner Classes
From Suhrid.net Wiki
Jump to navigationJump to search
- Inner classes have access to members of the outside classes.
- Think of the Inner class as sort of a MEMBER of the outer class.
- This means that regular Inner classes cannot have any statics (variables or methods)
- Only way to access an instance of the inner classes is through an instance of the outer class.
- Remember the funny syntax:
Outer o = new Outer();
Outer.Inner i = o.new Inner()