Women in Technology

Hear us Roar



Article:
  Nested Classes, Part 1
Subject:   static inner class
Date:   2004-06-21 07:11:08
From:   Robert Simmons Jr. (Kraythe)
Response to: static inner class

Oh, that is easy. Compositional relationships. For example, consider an entry in a Hashtable. The entry itself cannot exist outside of the hashtable. Nor is there any reason for users of the table to access the class. Therefore, a private static nexted class is the perfect answer.