Multiple choice technology programming languages

public class xyz { public static void main(String args[]) { for(int i = 0; i < 2; i++) { for(int j = 2; j>= 0; j--) { if(i == j) break; System.out.println("i=" + i + " j="+j); } } } } A) i=0 j=0 B) i=0 j=1 C) i=0 j=2 D) i=1 j=0 E) i=1 j=1 F) i=1 j=2 G) i=2 j=0 H) i=2 j=1 I) i=2 j=2

  1. B,C

  2. A,I,F

  3. B,C,F

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The nested loops iterate with i from 0 to 1 and j from 2 down to 0. When i equals j, the inner loop breaks. This produces outputs: when i=0, j prints 2 then 1 (breaks at 0); when i=1, j prints 2 then breaks at 1. The outputs are (i=0,j=2), (i=0,j=1), and (i=1,j=2).