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 13 Line 5 will be never reached. 12 11 10 13 Line 5 will be never reached. 12 11 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<1; i--) for(; ;) for(i=0; ; i++) All of these for(i=0 ; i<1; i--) for(; ;) for(i=0; ; i++) 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; } }} 2 1 2 3 1 0 2 1 2 3 1 0 ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control Consider the following program written in Java.class Test{ public static void main(String args[]){ int x=7; if(x==2); // Note the semicolon System.out.println("NumberSeven"); System.out.println("NotSeven"); }}What would the output of the program be? Error NumberSeven NotSeven 7 NumberSeven NotSeven Error NumberSeven NotSeven 7 NumberSeven NotSeven 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 result of compiling and runnig the following code:public class Test{ public static void main(String... args) throws Exception{ Integer i = 34; int l = 34; if(i.equals(l)){ System.out.println("true"); }else{ System.out.println("false"); } }} Compiler error true None of these false Compiler error true None of these false ANSWER DOWNLOAD EXAMIANS APP