JAVA Flow Control Which of the following for loops will be an infinite loop? for(; ;) 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 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 9 None of these 20 10 11 9 None of these 20 10 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); }} 1 0 2 The program does not compile because of statement "i=++i;" None of these 1 0 2 The program does not compile because of statement "i=++i;" None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control What is the value of a[1] after the following code is executed?int[] a = {0, 2, 4, 1, 3};for(int i = 0; i < a.length; i++) a[i] = a[(a[i] + 3) % a.length]; 4 1 3 2 0 4 1 3 2 0 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 false None of these Compiler error true false None of these 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 switch, if continue, if if, switch if, break switch, if continue, if if, switch ANSWER DOWNLOAD EXAMIANS APP