Given: What is the result?
A.
Compilation fails at line 3
B.
Compilation fails at line 5
C.
Compilation fails at line 10
D.
Compilation fails at line 9
E.
Compilation succeeds
Given: What is the result?
A.
Compilation fails at line 3
B.
Compilation fails at line 5
C.
Compilation fails at line 10
D.
Compilation fails at line 9
E.
Compilation succeeds
ะก
Code to test:
public class A {
private void a() {
}
class B {
private void b() {
a();
}
}
public static void main(String[] args) {
B b =new A().new B();
b(); // failed but works if b.b();
}
}