Can anyone say about anonymous class?!! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can anyone say about anonymous class?!!

12th Mar 2017, 10:25 AM
yaamini rajkumar
yaamini rajkumar - avatar
4 Answers
+ 6
Anonymous is a inner class declared without class name , it is used to override the method or interface
12th Mar 2017, 11:29 AM
Amar Dahake
+ 1
I think they are the way to extend the classes! Is that right?!
12th Mar 2017, 10:50 AM
yaamini rajkumar
yaamini rajkumar - avatar
+ 1
Anonymous classes are like local classes except that they do not have a name. Use them if you need to use a local class only once. (https://docs.oracle.com/javase/tutorial/java/javaOO/anonymousclasses.html)
12th Mar 2017, 2:54 PM
Jeffrey McKnight
Jeffrey McKnight - avatar
- 2
just read information from book and that's all
12th Mar 2017, 10:34 AM
Ihor