Contact Us || Privacy Policy || About Us |
|
Anonymous Inner class in Java→ The anonymous class is also known as an anonymous inner class that means An inner class that is declared without a name is known as an anonymous class in java. → Inner class in java, which has no name is called Anonymous Inner class. Important point:
→ Create Anonymous inner class in the following way :-
1) Example by extending a class:Output:- ![]() 2) Example by extending abstract class:Output:- ![]() 3) Example by implementing interface:Output:- ![]()
Next TopicStatic Nested class in Java
|