الرجوع
تسجيل الدخول

What will be the output of the following code?

class A {
    void show() {
        System.out.println("A show()");
    }
}

class B extends A {
    void show() {
        System.out.println("B show()");
    }
}

class C extends B {
    void show() {
        super.show();
        System.out.println("C show()");
    }
}

public class Test {
    public static void main(String[] args) {
        C obj = new C();
        obj.show();
    }
}