Inner Classes

From Suhrid.net Wiki
Revision as of 02:50, 4 June 2011 by Suhridk (talk | contribs) (Created page with "* 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 '''cann...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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()