if/else mysteryConsider the following Java code.
public static void mystery3(int x, int y) {
int z = 4;
if (z <= x) {
z = x + 1;
} else {
z = z + 9;
}
if (z <= y) {
y++;
}
System.out.println(z + " " + y);
}
Fill in the boxes with the output produced by each of the method calls.
mystery3(3, 20);
|
13 21 |
|
mystery3(4, 5);
|
5 6 |
|
mystery3(5, 5);
|
6 5 |
|
mystery3(6, 10);
|
7 11 |