How is it different from an inner class?
sanjay mca (19 Points)
21 January 2021How is it different from an inner class?
Prachi Bansal
(3124 Points)
Replied 29 January 2021
An anonymous inner class is an inner class name declared without a class name.
The difference between the both would be:-
1. An anonymous inner class has no class name whereas an inner class has a class name.
2. An inner class consists of a class declared within a method whereas an anonymous inner class is declared when an instance is created
I hope that helps!
"Live class on Python for Financial Analysis: Unlocking Efficiency in Accounting and Finance"
GST Live Certification Course (39th Batch) - April 2024 (Weekend Batch) (With Certificate)