Education, Engineering Course, online computer coaching, programming course, Uncategorized

What are the advantages of Inner class in Java?-tcicomputercoaching.com


java Inner Class 
or nested class is a class i.e. declared inside the class or interface.
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 the outer class including
private data members and methods.
An advantage of Javainner classes
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 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.

TCCI Coaching Institute provide coaching for various

programming Languages in Bopal and Satellite in Ahmedabad
. We conduct

online class 
and offline class both.

To know more in detail about Java Language at TCCI.

Visit us @ http://tccicomputercoaching.com/

Call us @ 98256 18292.

 

Leave a comment