Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
507 B
2
Indexable
Never
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();
    }
}