We've expanded our news coverage and improved our search! Visit
news.oreilly.com for the latest or search for all things across O'Reilly!
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. |