Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inner class

 
Jait Thomas
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody tell me an instance in which we use inner class?
 
Kenneth Brooks
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://java.sun.com/docs/books/tutorial/java/javaOO/innerclasses.html

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
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


ActionListener as an inner class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic