A class defined within another class is called a nested class. Like other members of a class, a nested class can be declared static or not. A nonstatic nested class is called an inner class. An instance of an inner class can exist only within an instance of its enclosing class and has access to its enclosing class's members even if they are declared private. 
The following table shows the types of nested classes: 
Types of Nested Classes Type Scope Inner 
static nested class member no 
inner [non-static] class member yes 
local class local yes 
anonymous class only the point where it is defined yes
google search
 
  
    Custom Search
  
Thursday, August 7, 2008
Summary of Nested Classes
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment