In the following code for a class in which methodA has an inner class.
1. public class Outer {
2. private static final int ID = 5;
3. private
String name;
4. public void methodA(final int nn) {
5. int serialN = 22;
6. class inner {
7. void showResult() {
8. System.out.println("Rslt=" + XX);
9. }
10. } // end class inner
11. new inner().showResult();
12. } // end methodA
13. }
which variables would the statement in line 8 be able to use in place of XX? Check all which apply.
a. the int ID in line 2
b. the String name in line 3
c. the int nn in line 4
d. the int serialN in line 5
I think the answer should be A and C. But the answer mock exam showed is ABC. Is it a wrong answer?
Ada