Do we require instance for subclass? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Do we require instance for subclass?

Every class require an instance so we created instance for animal class which is SuperClass of class cat and class dag. Why we didn't created instance for dog and cat?

29th Nov 2018, 7:21 AM
Sonu
Sonu - avatar
1 Answer
+ 1
you can also create a instance of cat and dog class ..if you want to call method of cat or dog class
29th Nov 2018, 7:48 AM
Mayur Beldar
Mayur Beldar - avatar