jQuery in Action, 2nd edition*
The moose likes Beginning Java and the fly likes Inner class!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Inner class!!!" Watch "Inner class!!!" New topic
Author

Inner class!!!

Tulsi Rai
Ranch Hand

Joined: Jun 26, 2002
Posts: 55
Hi All,
I am trying to figure out a real-world situation where we have to use inner class to address that particular situation. I know the definition, syntax and rules of their interaction with the enclosing class. but I would appreciate if you (who have hands-on experience using inner classes) could give me a situation with explanation on its need using inner class.
thanks.
Julia Reynolds
Ranch Hand

Joined: May 31, 2001
Posts: 123
Event handling in a Swing application is a good example of where to implement an inner class.
Tulsi Rai
Ranch Hand

Joined: Jun 26, 2002
Posts: 55
Thanks Julia. That's the only situation I am familiar too. But I would like to see other areas of application.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
trai,

Welcome (back) to JavaRanch!

We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.

Thanks Pardner! Hope to see you 'round the Ranch!


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Inner class!!!
 
Similar Threads
can method overriding be done from the same class?
Inner Classes when to use them?
Doubt on Anonymous class
About Inner Classes
Inner Classes