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 0 1 2 -1 None of these 0 1 2 -1 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? Error NotSeven NumberSeven 7 NumberSeven NotSeven Error NotSeven NumberSeven 7 NumberSeven NotSeven 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; } }} 4 0 2 3 1 4 0 2 3 1 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); }} 20 11 9 None of these 10 20 11 9 None of these 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);} a abcd ab abc aa a abcd ab abc aa 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, switch continue, if switch, if if, break if, switch continue, if switch, if if, break ANSWER DOWNLOAD EXAMIANS APP