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

What will be the output of the following code?

class A {
    int i = 10;
}

class B extends A {
    int i = 20;

    void display() {
        System.out.println(super.i);
    }
}

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