look at below question:
Examine the following code which includes an inner class:
public final class Test4 implements A {
class Inner {
void
test() {
if (Test4.this.flag); {
sample();
}
}
}
private boolean flag = false;
public void sample() {
System.out.println("Sample");
}
public Test4() {
(new Inner()).test();
}
public static void main(
String args []) {
new Test4();
}
}
What is the result:
A. Prints out "Sample"
B. Program produces no output but terminates correctly.
C. Program does not terminate.
D. The program will not compile
Select the most appropriate answer.
Please pay attention to the bold sentence,it runs strangely.