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); }} 4 2 5 6 3 4 2 5 6 3 ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control Which of the following for loops will be an infinite loop? All of these 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--) ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control What will be the output of the following program?public class Test{ public static void main(String args[]){ int i = 0, j = 5 ; for( ; (i < 3) && (j++ < 10) ; i++ ){ System.out.print(" " + i + " " + j ); } System.out.print(" " + i + " " + j ); }} Compilation Error 0 6 1 5 2 5 3 5 0 6 1 7 2 8 3 8 0 6 1 7 2 8 3 9 Compilation Error 0 6 1 5 2 5 3 5 0 6 1 7 2 8 3 8 0 6 1 7 2 8 3 9 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); 0 8 11 9 10 0 8 11 9 10 ANSWER DOWNLOAD EXAMIANS APP
JAVA Flow Control What is the printout of the following switch statement?char ch = 'a'; switch (ch){ case 'a': case 'A': System.out.print(ch); break; case 'b': case 'B': System.out.print(ch); break; case 'c': case 'C': System.out.print(ch); break; case 'd': case 'D': System.out.print(ch);} aa ab abc abcd a aa ab abc abcd a 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); 12 11 13 Line 5 will be never reached. 10 12 11 13 Line 5 will be never reached. 10 ANSWER DOWNLOAD EXAMIANS APP