What is inner class?Describe the uses with suitable example?
Answers
Answered by
2
There are two types of nested classes non-static and static nested classes.The non-static nested classes are also known as inner classes. A class created within class and outside method. A class created for implementing interface or extending class. Its name is decided by the java compiler.
Answered by
0
Inner class means one class which is a member of another class. There are basically four types of inner classes in java.
1) Nested Inner class
2) Method Local inner classes
3) Anonymous inner classes
4) Static nested classes
1) Nested Inner class
2) Method Local inner classes
3) Anonymous inner classes
4) Static nested classes
Similar questions
Math,
7 months ago
Math,
7 months ago
Math,
1 year ago
Social Sciences,
1 year ago
Biology,
1 year ago