Java - Inheritance
Which of the following is the correct syntax to declare a child class Dog that inherits from a parent class Animal?
?
Which of the following is the correct syntax to declare a child class Dog that inherits from a parent class Animal?
?
extends followed by the parent class name.class Dog extends Animal {} is valid syntax for inheritance.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions