0
What is the output of the following Java program?
public class Main {
int x = 10;
class Inner {
int x = 20;
void show(int x) {
System.out.println(x + " " + this.x + " " + Main.this.x);
}
}
public static void main(String[] args) {
Main m = new Main();
Main.Inner obj = m.new Inner();
obj.show(30);
}
}- A30 20 10
- B10 20 30
- C30 10 20
- D20 30 10
Correct answer: A