• HOME
  • QUIZ
  • CONTACT US
EXAMIANS
  • COMPUTER
  • CURRENT AFFAIRS
  • ENGINEERING
    • Chemical Engineering
    • Civil Engineering
    • Computer Engineering
    • Electrical Engineering
    • Mechanical Engineering
  • ENGLISH GRAMMAR
  • GK
  • GUJARATI MCQ

JAVA FLOW CONTROL

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

ANSWER DOWNLOAD EXAMIANS APP

JAVA Flow Control
In java, ............ can only test for equality, where as .......... can evaluate any type of the Boolean expression.

switch, if
if, switch
continue, if
if, break

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 ); }}

0 6 1 7 2 8 3 8
Compilation Error
0 6 1 5 2 5 3 5
0 6 1 7 2 8 3 9

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?

NumberSeven
NotSeven
NumberSeven NotSeven
Error
7

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
None of these
11
10
20

ANSWER DOWNLOAD EXAMIANS APP
  • «
  • 1
  • 2
  • 3
  • 4
  • »

GO TO PAGE

DOWNLOAD APP

  • APPLE
    from app store
  • ANDROID
    from play store

SEARCH

LOGIN HERE


  • GOOGLE

FIND US

  • 1.70K
    FOLLOW US
  • EXAMIANSSTUDY FOR YOUR DREAMS.
  • SUPPORT :SUPPORT EMAIL ACCOUNT : examians@yahoo.com

OTHER WEBSITES

  • GUJARATI MCQ
  • ACCOUNTIANS

QUICK LINKS

  • HOME
  • QUIZ
  • PRIVACY POLICY
  • DISCLAIMER
  • TERMS & CONDITIONS
  • CONTACT US
↑