What are the advantages of the inner classes? | SoloLearn: Learn to code for FREE!

+1

What are the advantages of the inner classes?

4/21/2019 7:24:48 PM

Preet

1 Answer

New Answer

+1

There are basically three advantages of inner classes in java. They are as follows: 1) Nested classes represent a special type of relationship that is it can access all the members (data members and methods) of outer classincluding private. 2) Nested classes are used to develop more readable and maintainable code because it logically group classes and interfaces in one place only. 3) Code Optimization: It requires less code to write