What is a nested class, and how many types of nested classes are available in java?
i. Non static nested classes are called as inner classes
ii. Inner classes has two categories one is Local Inner class and Anonymous inner class
iii. It is possible to have local static nested class in a function.
i & ii
i, ii, & iii
Nested class : class with in a class is nested class.
Nested classes are two broad categories: 1.Static nested 2.Non static nested (inner class).
There are two kinds of inner classes are available
a.Local Inner Class b. Anonymous inner class.
Note: It is not possible to have static nested class in a function. But non-statics are possible.
Back To Top