Answer Posted / ranganathkini
An inner class is a class that is defined within the
definition of another class but outside any member
definition. Inner classes shud not be marked static.
An Inner class cannot be instantiated directly, i.e. one can
only instantiate an inner class by first instantiating the
outer class.
The Inner class has access to all the static as well as
non-static public/protected/private fields of its enclosing
outer class.
Inner classes are used to provide implementation that are
intimately connected with the enclosing outer class.
| Is This Answer Correct ? | 39 Yes | 7 No |
Post New Answer View All Answers
What is the use of protected in java?
What is the difference between jfc & wfc?
Can a static method be overridden in java?
When a byte datatype is used?
What is a percentage sign called?
Is oracle charging for java?
How many bits is a float?
How many static init can you have?
What is a key in java?
What is the use of default method in interface in java?
Can we use catch statement for checked exceptions?
Who is the owner of java?
What is an object in java and how is it created?
List any five features of java?
What about method local inner classes or local inner classes in java?