Untitled
Anonymous
plain_text
02/19/2021 5:56 PM
676 B
19
Indexable
public class Main {
public static void main(String[] args) {
Bike b = new Bike();
b.fun();
}
}
class Rower {
public Rower() {
System.out.println("rower constructor");
}
public void fun(){
System.out.println("rower fun");
}
}
class Bike extends Rower {
public Bike() {
System.out.println("bike constructor");
}
public void fun() {
System.out.println("bike func");
super.fun();
}
}Editor is loading...