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); }} None of these 1 2 0 -1 None of these 1 2 0 -1 ANSWER DOWNLOAD EXAMIANS APP
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 8 11 0 10 9 8 11 0 10 ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control What will be the value of y after execution of switch statement?public class Test{ public static void main(String[] args){ int x = 3, y = 4; switch(x + 3){ case 6: y = 0; case 7: y = 1; default: y += 1; } }} 1 4 0 3 2 1 4 0 3 2 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 Error NotSeven NumberSeven NotSeven NumberSeven 7 Error NotSeven NumberSeven NotSeven NumberSeven 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 12 10 13 Line 5 will be never reached. 11 12 10 13 Line 5 will be never reached. 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(i=0; ; i++) for(; ;) for(i=0 ; i<1; i--) All of these for(i=0; ; i++) for(; ;) ANSWER DOWNLOAD EXAMIANS APP