Java MCQ - English
Which of these can be returned by the operator & ?
Integer
Boolean
Character
Integer or Boolean
Answer : D
View More Related Question
1) When a=9, b=12 and c=3 what will be the value of x for the expression x=9-12/3+3*2-1
2) When the operator ++ is placed after the variable name, first assignment of the value of the variable takes place and then the value of the variable is incremented, this operation is also called ………………………….. .
3) Which of the following is the correct expression that evaluates to true if the number x is between 1 and 100 or the number is negative?
1 < x < 100 || x < 0
((x < 100) && (x > 1)) || (x < 0)
((x < 100) && (x > 1)) && (x < 0)
(1 > x > 100) || (x < 0)
View Answer
4) What will be the output of the above fraction of code ?int ++a = 100 ;
System.out.println( ++a ) ;
100
Displays error as ++a is not enclosed in double quotes in println statement
Compiler displays error as ++a is not a valid identifier
None of these
View Answer
5) If int x=15; y=20; what will be the value of x after executing the following statement x=(x