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) super.displayInfo()
Correct Answer:

Verified
Correct Answer:
Verified
Q28: You are creating a class inheritance hierarchy
Q57: Which of the following is true regarding
Q71: You are creating a Motorcycle class which
Q72: Consider the following class hierarchy: public class
Q73: Consider the following code snippet: public class
Q74: Consider the following code snippet: public class
Q76: Consider the Counter class below. public class
Q77: With a few exceptions, instance variables of
Q79: Consider the following inheritance hierarchy diagram: <img
Q80: Suppose the abstract class Message is defined