Do we require instance for subclass? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
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 ответ
+ 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