Question 2-2

Say we've defined the following method.

public static int f(int n) {
    IO.println(n);
    return n / 2;
}
Also, say our program executes the line
IO.println(1 + f(1 + f(16)));
What is printed in executing this line?

Solution

16
9
5

Back to 9:40 Quiz 2