This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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.
I agree. Here's the link:
subject: Inner class
It's not a secret anymore!