What will be the output when running the following program?.
public class Main { public static void main(String[] args) { int i=0; int j; for (j=0; j<10; ++j) { i++; } System.out.println(i + " " + j); } }
Select the two correct answers.
(b) and (e)
Both the first and the second number printed will be 10.
Both the loop body and the increment expression will be executed exactly 10 times.
Each execution of the loop body will be directly followed by an execution of the increment expression.
Afterwards, the condition j<10 is evaluated to see whether the loop body should be executed again.