Examine the following code segment:

int[] nums = {0, 1, 2, 3, 4};
for (int number : nums)
{
   System.out.print(number + " ");
   System.out.println(number < 3 ? "is less than 3." : "is more than 3.");
}

What is printed to the terminal when the above code is executed? (Note: my math may be wrong....)

0 is less than 3.
1 is less than 3.
2 is less than 3.
3 is more than 3.
4 is more than 3.
  • 0 true
    1 true
    2 true
    3 false
    4 false
  • 0 number < 3 ? " is less than 3." : " is more than 3."
    1 number < 3 ? " is less than 3." : " is more than 3."
    2 number < 3 ? " is less than 3." : " is more than 3."
    3 number < 3 ? " is less than 3." : " is more than 3."
    4 number < 3 ? " is less than 3." : " is more than 3."
  • Nothing will be printed. This code contains incorrect syntax and will not compile.

There are not hints for this question