0 votes
in JAVA by
What are the advantages of Java inner classes?

1 Answer

0 votes
by

There are two types of advantages of Java inner classes.

Nested classes represent a special type of relationship that is it can access all the members (data members and methods) of the outer class including private.

Nested classes are used to develop a more readable and maintainable code because it logically groups classes and interfaces in one place only.

Code Optimization: It requires less code to write.

Related questions

0 votes
asked May 4, 2021 in JAVA by SakshiSharma
0 votes
asked Apr 8, 2021 in JAVA by SakshiSharma
...