+ 2
Divya Coder Why are you spamming? Why don't see in Code Playground?
+ 1
Divya Coder
Learn programming and get answer. You need lots of practice to understand concepts so just go and start learning courses from here on Sololearn.
And don't spam with multiple questions.
I am sure your teacher must teach you in School or College.
This is an example of Inheritance so learn Inheritance.
Here class C extends class B
and you have created object of class C so 'Inside B' would be print.
+ 1
Divya Coder are you spamming here đ¤Łđ¤Ł
If you are asking question here for your homework then I will help you don't worry.
Output:
Inside B
Now, you think why this output comes. So let's see the reason behind the output. The above program implements a Multi-level hierarchy. So the program is linearly
searched up until a matching function is found. Here, it is present in both classes A
and B. So class Bâs print() method is called.
HopeâŁď¸
It would be helpful for you đ