JAVA Flow Control What will be the result?1. int i = 10;2. while(i++ <= 10){3. i++;4. }5. System.out.print(i); 12 11 Line 5 will be never reached. 13 10 12 11 Line 5 will be never reached. 13 10 ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control What will be the value of y after execution of switch statement?public class Test{ public static void main(String[] args){ int x = 3, y = 4; switch(x + 3){ case 6: y = 0; case 7: y = 1; default: y += 1; } }} 2 1 0 4 3 2 1 0 4 3 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); }} 2 5 4 6 3 2 5 4 6 3 ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control Which of the following for loops will be an infinite loop? All of these for(i=0; ; i++) for(; ;) for(i=0 ; i<1; i--) All of these for(i=0; ; i++) for(; ;) for(i=0 ; i<1; i--) 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); }} 20 11 9 None of these 10 20 11 9 None of these 10 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"); } }} FALSE Compilation Error TRUE Runtime Error FALSE Compilation Error TRUE Runtime Error ANSWER DOWNLOAD EXAMIANS APP