Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Glenn Duncan   on Apr 08 In Java Category.

  
Question Answered By: Adalwine Fischer   on Apr 08

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



For more Information about static nested class and inner [non-static] class refer to:

articles.techrepublic.com.com/...8_11-5815620.html

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on nested class Or get search suggestion and latest updates.


Tagged: