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) {
        Main m = new MainEx();
        m.fun();
        System.out.println(m);
    }

    public Main(){
        System.out.println("D");
    }

    public void fun(){
        System.out.println("C");
    }
}

class MainEx extends Main {

    public void fun(int value){
        this.fun();
        System.out.println("B");
    }

    public void fun(){
        System.out.println("A");
        super.fun();
    }
}