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 4 0 1 3 2 4 0 1 3 ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control What all gets printed when the following program is compiled and run.public class Test{ public static void main(String args[]){ int i, j=1; i = (j>1)?2:1; switch(i){ case 0: System.out.println(0); break; case 1: System.out.println(1); case 2: System.out.println(2); break; case 3: System.out.println(3); break; } }} 1 2 2 3 1 0 1 2 2 3 1 0 ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control What all gets printed when the following program is compiled and run?public class Test{ public static void main(String args[]){ int i=0, j=2; do{ i=++i; j--; }while(j>0); System.out.println(i); }} 2 None of these The program does not compile because of statement "i=++i;" 1 0 2 None of these The program does not compile because of statement "i=++i;" 1 0 ANSWER DOWNLOAD EXAMIANS APP
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 10 13 Line 5 will be never reached. 12 11 10 13 Line 5 will be never reached. 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 if, switch continue, if switch, if if, break if, switch continue, if switch, if 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); }} 11 20 9 None of these 10 11 20 9 None of these 10 ANSWER DOWNLOAD EXAMIANS APP