Solved

Consider the Following Class Hierarchy: Which of the Following

Question 69

Multiple Choice

Consider the following class hierarchy: Consider the following class hierarchy:   Which of the following code fragments is NOT valid in Java?  A) Vehicle myAuto = new Auto( sedan ) ; B) LandVehicle myAuto = new Auto( sedan ) ; C) Auto myAuto = new Auto( sedan ) ; D) LandVehicle myAuto = new Vehicle( sedan ) ; Which of the following code fragments is NOT valid in Java?


A) Vehicle myAuto = new Auto("sedan") ;
B) LandVehicle myAuto = new Auto("sedan") ;
C) Auto myAuto = new Auto("sedan") ;
D) LandVehicle myAuto = new Vehicle("sedan") ;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

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