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]; 3 1 4 2 0 3 1 4 2 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? 7 NumberSeven NotSeven Error NotSeven NumberSeven 7 NumberSeven NotSeven Error NotSeven NumberSeven ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control In java, ............ can only test for equality, where as .......... can evaluate any type of the Boolean expression. switch, if if, switch if, break continue, if switch, if if, switch if, break continue, if 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); }} 0 None of these 1 The program does not compile because of statement "i=++i;" 2 0 None of these 1 The program does not compile because of statement "i=++i;" 2 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); }} 1 -1 0 None of these 2 1 -1 0 None of these 2 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); }} 3 6 5 2 4 3 6 5 2 4 ANSWER DOWNLOAD EXAMIANS APP