Multiple Choice
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) This cannot be done unless the Auto class uses a public method in a superclass that returns the type data.
Correct Answer:

Verified
Correct Answer:
Verified
Q2: Which of the following indicates that a
Q74: Consider the following code snippet:<br>Public class Coin<br>{<br>Private
Q75: Insert the missing code in the following
Q76: Which of the following could be used
Q77: Which of the following statements about an
Q78: Consider the following code snippet:<br>Public interface Sizable<br>{<br>Int
Q81: Consider the following code snippet:<br>Public class Motorcycle
Q82: Consider the following inheritance hierarchy diagram: <img
Q87: Consider the following code snippet:<br>If(anObject instanceof Auto)<br>{<br>Auto
Q90: The _ reserved word in a method