What will be the output when the following program is run?
public class Main{ public static void main (String args []){ int i; /*from ww w .j a v a 2s . c om*/ int j; for (i = 0, j = 0; j < i; ++j, i++){ System.out.println (i + " " + j); } System.out.println (i + " " + j); } }
Select 1 option
Correct Option is : B
++j and i++ do not matter in this case.
The loop will not execute even once since j is not less than i at the start of the loop.
The condition fails and the program will print 0 0 just once.