0
What is the output of the following Java program?
class A {
A() { show(); }
void show() { System.out.print("A"); }
}
class B extends A {
int x = 5;
void show() { System.out.print("B" + x); }
}
public class Main {
public static void main(String[] args) { new B(); }
}- AB0
- BB5
- CA
- DAB0
Correct answer: A