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 are exceptions
What is a platform?
Why we use multi threading instead of multiprocessing?
Is arraylist zero based?
What are implicit objects in java?
How are multiple inheritances done in Java?
What does nullpointerexception mean?
What is string length in java?
What is difference between float and double?
What are the types of methods in java?
What is anti pattern in cyber security?
What is a nested structure?
What does bitwise or mean?
What are the advantages of java inner classes?
What is variable and its types?