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"); } }} Runtime Error TRUE FALSE Compilation Error Runtime Error TRUE FALSE Compilation Error 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 NumberSeven NotSeven Error 7 NumberSeven NotSeven NumberSeven NotSeven Error ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control Which of the following for loops will be an infinite loop? for(i=0 ; i<1; i--) All of these for(; ;) for(i=0; ; i++) for(i=0 ; i<1; i--) All of these for(; ;) for(i=0; ; i++) 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 switch, if continue, if if, break if, switch switch, if continue, if 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]; 1 2 4 3 0 1 2 4 3 0 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); }} 9 20 None of these 10 11 9 20 None of these 10 11 ANSWER DOWNLOAD EXAMIANS APP