posted 22 years ago
Here's a simple (albeit contrived) example:
In this case, I made a Person interface and included with it a nested class that could be used to sort objects of that type using some sort of normal ordering. In this case, my ordering went by last name, then first name.
I'm sure there are better examples, but this is one I came up with off the top of my head.
the advantage of using the nested class is that two classes, which are tightly coupled, can be grouped. This helps encapsulate any functionality pertaining to a Person to a single place.
I hope that helps,
Corey
[ June 19, 2002: Message edited by: Corey McGlone ]