JAVA Flow Control What will be the result?1. int i = 10;2. while(i++ <= 10){3. i++;4. }5. System.out.print(i); 10 12 13 Line 5 will be never reached. 11 10 12 13 Line 5 will be never reached. 11 ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control Determine output:public class Test{ public static void main(String args[]){ int i, j; for(i=1, j=0;i<10;i++) j += i; System.out.println(i); }} 9 10 None of these 11 20 9 10 None of these 11 20 ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control What is the printout of the following switch statement?char ch = 'a'; switch (ch){ case 'a': case 'A': System.out.print(ch); break; case 'b': case 'B': System.out.print(ch); break; case 'c': case 'C': System.out.print(ch); break; case 'd': case 'D': System.out.print(ch);} aa abc abcd a ab aa abc abcd a ab ANSWER DOWNLOAD EXAMIANS APP
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); } } }} 1 2 3 2 Repeatedly print 1 2 3 and cause infinite loop. None of these Compilation fails because of line 2 1 2 3 1 1 2 3 2 Repeatedly print 1 2 3 and cause infinite loop. None of these Compilation fails because of line 2 1 2 3 1 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); }} None of these -1 0 2 1 None of these -1 0 2 1 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 Compilation Error FALSE Runtime Error TRUE Compilation Error FALSE Runtime Error ANSWER DOWNLOAD EXAMIANS APP