✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Given :
class A {
A() {
display();
}
void display() {
System.out.println("A");
}
}
class B extends A {
int value = 10;
void display() {
System.out.println(value);
}
}
What will be printed when this is executed?
public class Test {
public static void main(String[] args) {
A obj = new B();
}
}