1. Use the ? construction to assign to the variable sign the value +1 is i is positive and -1 if i is non-positive.
sign = (i > 0)? 1 : -12. What is printed by the following code fragment? Trace your results, do not just guess.
for (i = 0, j = 2; i < 4 && j > 0; i++, j--)
System.out.println(i + " " + j);
Tracing: i = 0 then 1 then 2
j = 2 then 1 then 0
What will be printed:
0 2
1 1