Hi I'd like some background on why all the different types of classes, inner classes especially, are included in the language. I can think up some reasons, but I would like some literature. Doubt the JLS or such deals with this. Example: Why implement an anonymous class in your method? When is it a good idea and when not? ps. Try to post a link before moving away the thread because its not 'an SCJP objective'... ;-) Kidding.
Hi Jim: You can also read web page In nutshell, inner class facility in Java is a construct for providing multiple inheritance. Two unrelated classes in different inheritance hierarchies can be merged by placing one into the other textually. Hence, the one inside (the inner class) can access (sort of inherit) all members from outer classes. Once you will read the literature, you will find proper and improper use of inner classes. Thanks Barkat