Question 0-2

Say we've defined the following method.

public static int f(int n) {
    IO.print(n);
    return 1 + n;
}
Suppose our program executes the line
IO.println(3 + f(2 + f(1)));
What is printed in executing this line?

Solution

1
4
8

Back to 8:00 Quiz 0