Which statements can be inserted at the indicated position in the following code to make the program write 1 on the standard output when run?() public class Q4a39 { int a = 1; int b = 1; int c = 1; class Inner { int a = 2; int get() { int c = 3; // insert statement here return c; } } Q4a39() { Inner i = new Inner(); System.out.println(i.get()); } public static void main(String args[]) { new Q4a39(); } }
- A、c = b;
- B、c = this.a;
- C、c = this.b;
- D、c = Q4a39.this.a;
- E、c = c;
正确答案:A,D
答案解析:有
微信扫一扫手机做题