Qus: What are the advantages of Java inner classes?
1. 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.
2. Nested classes are used to develop a more readable and maintainable code because it logically groups classes and interfaces in one place only.
3.Code Optimization: It requires less code to write.