How many times will the following code print "Hello World"?
3: for(int i=0; i<10 ; ) { 4: i = i++; 5: System.out.println("Hello World"); 6: }
F.
The update statement of the for loop is missing.
It is fine as the statement is optional, so option D is incorrect.
The expression inside the loop increments i but then assigns i the old value.
i ends the loop with the same value that it starts with: 0.
The loop will repeat infinitely, outputting the same statement over and over again because i remains 0 after every iteration of the loop.