✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Consider the following class hierarchy:
public class Vehicle
{
private String type;
public Vehicle(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
}
public class LandVehicle extends Vehicle
{
public LandVehicle(String type)
{
. . .
}
}
public class Auto extends LandVehicle
{
public Auto(String type)
{
. . .
}
}
Which of the following code fragments is NOT valid in Java?
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!