JAVA Flow Control How many times will the following code print "Welcome to Examveda"?int count = 0;do { System.out.println("Welcome to Examveda"); count++;} while (count < 10); 9 0 10 11 8 9 0 10 11 8 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); 11 10 12 13 Line 5 will be never reached. 11 10 12 13 Line 5 will be never reached. 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? NotSeven NumberSeven Error NumberSeven NotSeven 7 NotSeven NumberSeven Error NumberSeven NotSeven 7 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]; 0 2 1 3 4 0 2 1 3 4 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); }} None of these 20 10 9 11 None of these 20 10 9 11 ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control Which of the following for loops will be an infinite loop? for(; ;) All of these for(i=0 ; i<1; i--) for(i=0; ; i++) for(; ;) All of these for(i=0 ; i<1; i--) for(i=0; ; i++) ANSWER DOWNLOAD EXAMIANS APP