aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Inner class design motivation docs... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Inner class design motivation docs..." Watch "Inner class design motivation docs..." New topic
Author

Inner class design motivation docs...

Jim Crawford
Ranch Hand

Joined: Sep 08, 2002
Posts: 127
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.



<img src="cool.gif" border="0"> <img src="graemlins/beerchug.gif" border="0" alt="[beerchug]" /> <br />SCJP 1.4
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
Java Tutorial from Sun
Campfire Story
Inner Class Specification
I hope some of those are useful to you.


SCJP Tipline, etc.
Barkat Mardhani
Ranch Hand

Joined: Aug 05, 2002
Posts: 787
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
Jim Crawford
Ranch Hand

Joined: Sep 08, 2002
Posts: 127
Thanks. Will check it out.
 
Don't get me started about those stupid light bulbs.
 
subject: Inner class design motivation docs...
 
Similar Threads
upcasting and inner class question
Abstract Inner Classes
private inner class and static private inner class
Local Class
Inner Class