The Inner Classes can be classified in four types. They are:-
1. Regular Inner Class
2. Method Local Inner Class
3. Anonymous Inner Class
4. Static Nested Inner Class
All the types of inner classes are defined in their respective articles. The Inner classes though not much commonly used in Java, still find some important place in some programs. Though it is a bit too odd to see a class being placed inside another class, the behavior is more or less like a local method of the outer class. There is different functionality for all the different types of Inner classes. You may find the details in the individual articles for each type of Inner class.
I hope the article was able to clear your myth and doubts about the Inner classes in Java. If you liked the article then do leave a comment. Keep buzzing Java Code Online for more Java articles.
0 komentar:
Posting Komentar