here are a couple of questions that i would like an explanation on.
1.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
2.36]Which statements concerning the correlation between the inner and outer instances of non-static inner classes are true?
A]Member variables of the outer instance are always accessible to inner instances, regardless of their accessibility modifiers
B]Member variables of the outer instance can never be refered to using only the variable name within the inner instance
C]More than one inner instance can be associated with same outer instance
D]All variables from the outer instance that shouls be accessible in the inner instance myst be declared final
E]A class that is declared final cannot have any inner classes.
Thanks!