Java - Abstraction
What will be the output of the following code?
abstract class Vehicle {
abstract void start();
void stop() {
System.out.println("Vehicle stopped");
}
}
class Car extends Vehicle {
void start() {
System.out.println("Car started");
}
}
public class Test {
public static void main(String[] args) {
Vehicle v = new Car();
v.start();
v.stop();
}
}