ContactUs :

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

Nested Classes.........

--defining a class within another class is known as nested class.
--2 kinds of nested classes—
--static nested class, non static nested class(inner class).
--all member classes are not inner classes but all inner classes are member classes.
--inner class can access all the members of outer class but not vice versa.
--the scope of a nested class is bounded by the scope of its enclosing class.
--a static nested class is a class that must access the members of its enclosing class thru an object.
--3 kinds of inner classes
--member class, anonymous inner class, local class
--anonymous inner class is one that is not assigned a name.
--inner class object will not exist without the outer class object.
--the instance of the inner class exists only with the outer class.
Local class—a class inside a method or any block e.g. with in a “for loop”.
--encapsulating the portion of the code of the block or a method is the reason behind implementing local class.
Related Posts Plugin for WordPress, Blogger...
Flag Counter