• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inner class

 
soumyanil Kayal
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How is an inner class diferent from a subclass in terms of:
Whether an inner class can extend any other class?
Can it be declared static,private?
 
deekasha gunwant
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An inner class
--- is a class which is defined inside another class
--- can be static as well as private
--- can extend a class or implement an interface
--- it can access all the members of enclosing class (including private memnbers)
 
Thunthu Ganapathy
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also would like to add
* All non static nested classes are called inner classes.
Thanks,
Thunthu.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic