Test Class
unknown
java
4 years ago
536 B
9
Indexable
// Online Java Compiler
// Use this editor to write, compile and run your Java code online
class Vehcle{
public void start() {
System.out.println("The car is starting.....");
}
public void stop() {
System.out.println("The car is stoped.");
}
}
class Bmw extends Vehcle {
public void greeting() {
System.out.println("Greetings from BMW!");
}
}
class Main {
public static void main(String[] args) {
Vehcle vehcle = new Vehcle();
Vehcle bmw = new Bmw();
bmw.stop();
}
}Editor is loading...