What is the output of the following code snippet?
3: int count = 0; 4: ROW_LOOP: for(int row = 1; row <=3; row++) 5: for(int col = 1; col <=2 ; col++) { 6: if(row * col % 2 == 0) continue ROW_LOOP; 7: count++; 8: } 9: System.out.println(count);
B.
public class Main{ public static void main(String[] argv){ int count = 0; ROW_LOOP: for(int row = 1; row <=3; row++) for(int col = 1; col <=2 ; col++) { if(row * col % 2 == 0) continue ROW_LOOP; count++; //from w w w. j a v a 2 s .c o m } System.out.println(count); } }