✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
class A {
int x = 10;
void afficher() {
System.out.println("A");
}
}
class B extends A {
int x = 20;
void afficher() {
System.out.println("B");
}
}
public class Test {
public static void main(String[] args) {
A obj = new B();
System.out.println(obj.x);
obj.afficher();
}
}
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!