Sometimes you need an instance of a class - eg as a Listener for a Swing Event,, or a Runnable for a Thread - and these are most conveniently and compactly created locally as inner classes, often anonymous inner classes.
Reputation Points: 1907
Solved Threads: 950
Posting Expert
Offline 5,768 posts
since Apr 2008