+ 1
Is there any way of extending an main class from an inner class
2 Réponses
+ 4
Yes, there is.
When instantiating an inner class, you first need an object of the outer class. Since the class is inside another class, it is similar to any other data field or data member that the outer class has. So a local class that is not static can be instantiated using an object of the outer class.
https://code.sololearn.com/c7sl975gULuq/?ref=app
+ 2
Soumik Thanks