Solved

Suppose That Horse Is a Subclass of Animal, and Neither

Question 3

Multiple Choice

Suppose that Horse is a subclass of Animal, and neither class is abstract. Which of the following is an invalid declaration and initialization?


A) Horse h = new Horse() ;
B) Horse h = new Animal() ;
C) Animal a = new Animal() ;
D) Animal a = new Horse() ;
E) all of the above are valid

Correct Answer:

verifed

Verified

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents