What is the difference between a static and a non-static inner class

A non-static inner class may have object instances that are associated with instances ofthe class's outer class. A static inner class does not have any object instances.

Showing Answers 1 - 2 of 2 Answers

Dhananjay Singh

  • Sep 12th, 2005
 

The static inner classes  can be accessed with out creating it's objects or we can  access  static inner classes with direct class name but in the case of  non-static inner classes access we have to create the object of that class.

dapatel

  • Jul 4th, 2011
 

A non-static inner class may have object instances that are associated with instances of the class's outer class. A static inner class does not have any object instances.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions