+ 1

Is there any way of extending an main class from an inner class

https://code.sololearn.com/cXp8jzEy5oKb/?ref=app

4th Apr 2021, 12:53 AM
VṢtēphen
VṢtēphen - avatar
2 Respostas
+ 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
4th Apr 2021, 1:19 AM
Soumik
Soumik - avatar
+ 2
Soumik Thanks
4th Apr 2021, 7:37 AM
VṢtēphen
VṢtēphen - avatar