for Java
Posted: Sun May 15, 2022 8:05 am
for Java
Suppose that Horse is a subclass of Animal, and neither class is abstract. Which of the following is an invalid declaration and initialization? O Horse h = new Horse(); Horse h = new Animal(); = Animal a = new Animal(); O a = ; Animal a = new Horse();
Suppose that Horse is a subclass of Animal, and neither class is abstract. Which of the following is an invalid declaration and initialization? O Horse h = new Horse(); Horse h = new Animal(); = Animal a = new Animal(); O a = ; Animal a = new Horse();