Java - Object-Oriented Programming Concepts
Identify the error in this Java code snippet:
class Vehicle {
void start() {
System.out.println("Vehicle started");
}
}
class Car extends Vehicle {
void start() {
System.out.println("Car started");
}
}
public class Test {
public static void main(String[] args) {
Vehicle v = new Vehicle();
v.start();
Car c = new Vehicle();
c.start();
}
}