Consider the following class hierarchy: public class Vehicle
{
Private String type;
Public Vehicle(String type)
{
This.type = type;
}
Public String displayInfo()
{
Return type;
}
}
Public class LandVehicle extends Vehicle
{
Public LandVehicle(String type)
{
) . .
}
}
Public class Auto extends LandVehicle
{
Public Auto(String type)
{
) . .
}
Public String displayAutoType()
{
Return _____;
}
}
Complete the code in the Auto class method named displayAutoType to return the type data.
A) super(type) ;
B) super.type;
C) super.super.type;
D) super.displayInfo()
Correct Answer:
Verified
Q21: You are creating a Motorcycle class which
Q24: You are creating a Motorcycle class which
Q25: Consider the following code snippet: public class
Q26: Which of the following is true regarding
Q27: You are creating a Motorcycle class that
Q30: Which of the following indicates that the
Q31: Consider the following code snippet: public void
Q32: Consider the following code snippet: public class
Q34: Consider the following code snippet: public class
Q35: Which of the following is true regarding
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents