File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Inner class" Watch "Inner class" New topic

Inner class

Jait Thomas
Ranch Hand

Joined: Jul 03, 2003
Posts: 31
Can somebody tell me an instance in which we use inner class?

Jait Thomas<br />SCJP 1.2, SCWCD, SCDJWS 1.4 & 5.0
Kenneth Brooks

Joined: Feb 21, 2005
Posts: 9

The examples there aren't exactly the best. The most common use for inner classes is for event listeners (anonymous inner classes).
Hentay Duke
Ranch Hand

Joined: Oct 27, 2004
Posts: 198

ActionListener as an inner class.
It is sorta covered in the JavaRanch Style Guide.
subject: Inner class
jQuery in Action, 3rd edition