7. Given the following code what is the effect of a being 5?
public class Test {
public void add(int a) {
loop: for (int i = 1; i < 3; i++){
for (int j = 1; j < 3; j++) {
if (a == 5) {
break loop;
}
System.out.println(i * j);
}
}
}
}
Select 1 correct answer:
A. Generates a runtime error
B. Throws an ArrayIndexOutOfBoundsException
C. Prints the values: 1, 2, 2, 4
D. Produces no output