✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
class Vehicle {
void start() { System.out.println("Vehicle starting..."); }
}
class Car extends Vehicle {
void start() { System.out.println("Car starting..."); }
}
class Bike extends Vehicle { }
class SportsCar extends Car { }
public class CastingTest {
public static void main(String[] args) {
Vehicle v1 = new Car();
Vehicle v2 = new Bike();
Car c1 = new Car();
Bike b1 = new Bike();
Vehicle v3 = new SportsCar();
SportsCar sc1 = new SportsCar();
}
}Consider the code above to answer the following questions.
What is the result of each of the following method calls?
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!