What is wrong with the code fragment below, which is intended to add the numbers from 1 to 4 together and print out the result, which should be 10

int sum = 0;
for (int i = 1; i < 4; i++)
{
    sum = sum + i;
}
System.out.println("sum = " + sum);
The test condition must be <=
  • The test condition must be ==
  • None of these are correct
  • The loop control variable i must be declared prior to the loop
  • The loop control variable i must be initialized to zero
  • The sum variable must be initialized to one

There are not hints for this question