class A
{
{
class B
{
// What is the use of an inner class inside IIB?
}
}
}
Asked
Active
Viewed 74 times
1

dkatzel
- 31,188
- 3
- 63
- 67

Sonu Sharma
- 23
- 2
-
That is an _inner class_ of the _local_ variety. – Sotirios Delimanolis May 20 '15 at 04:50
1 Answers
0
We use inner classes
to logically group classes and interfaces in one place so that it can be more readable and maintainable.
Additionally, it can access all the members of outer class including private data members and methods.
A member class is also defined as a member of a class. Unlike the static variety, the member class is instance specific and has access to any and all methods and members, even the parent's this
reference.

Ankur Singhal
- 26,012
- 16
- 82
- 116