abstract class Vehicle {
abstract void start(); // Abstract method (no body)
}
class Car extends Vehicle {
void start() {
System.
out.
println("Car starts with a key."); }
}
public class Main {
public static void main
(String[] args
) { Vehicle myCar = new Car();
myCar.start(); // Output: Car starts with a key.
}
}
YWJzdHJhY3QgY2xhc3MgVmVoaWNsZSB7CiAgICBhYnN0cmFjdCB2b2lkIHN0YXJ0KCk7IC8vIEFic3RyYWN0IG1ldGhvZCAobm8gYm9keSkKfQoKY2xhc3MgQ2FyIGV4dGVuZHMgVmVoaWNsZSB7CiAgICB2b2lkIHN0YXJ0KCkgewogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiQ2FyIHN0YXJ0cyB3aXRoIGEga2V5LiIpOwogICAgfQp9CgpwdWJsaWMgY2xhc3MgTWFpbiB7CiAgICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB7CiAgICAgICAgVmVoaWNsZSBteUNhciA9IG5ldyBDYXIoKTsKICAgICAgICBteUNhci5zdGFydCgpOyAvLyBPdXRwdXQ6IENhciBzdGFydHMgd2l0aCBhIGtleS4KICAgIH0KfQ==