JAVA Flow Control What will be the result of the following code?public class Test{ static public void main(String args[]){ //line 2 int i, j; for(i=0; i<3; i++){ for(j=1; j<4; j++){ i%=j;System.out.println(j); } } }} Compilation fails because of line 2 Repeatedly print 1 2 3 and cause infinite loop. 1 2 3 2 1 2 3 1 None of these Compilation fails because of line 2 Repeatedly print 1 2 3 and cause infinite loop. 1 2 3 2 1 2 3 1 None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control What will be the output?public class Test{ public static void main(String args[]){ int i = 1; do{ i--; }while(i > 2); System.out.println(i); }} 0 1 2 -1 None of these 0 1 2 -1 None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control Which of the following for loops will be an infinite loop? for(i=0; ; i++) for(i=0 ; i<1; i--) All of these for(; ;) for(i=0; ; i++) for(i=0 ; i<1; i--) All of these for(; ;) ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control Determine output:public class Test{ public static void main(String args[]){ int i; for(i = 1; i < 6; i++){ if(i > 3) continue ; } System.out.println(i); }} 4 5 2 3 6 4 5 2 3 6 ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control In java, ............ can only test for equality, where as .......... can evaluate any type of the Boolean expression. if, break continue, if if, switch switch, if if, break continue, if if, switch switch, if ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control What will be the output?public class Test{ public static void main(String[] args){ int x=10, y=0; if(x && y){ System.out.print("TRUE"); } else{ System.out.print("FALSE"); } }} TRUE FALSE Compilation Error Runtime Error TRUE FALSE Compilation Error Runtime Error ANSWER DOWNLOAD EXAMIANS APP