
Java MCQs - Operators
There are many operators in Java to manipulate operations on variables. You may find groups of operators such as Arithmetic Operators, Relational Operators, Bitwise Operators, Logical Operators, Assignment Operators and Ternary Operators.
1. Which are the unary operators ?
A. ++
B. --
C. Both of above
View Answer
2. Which are the arithmetic operators ?
A. * / %
B. + -
C. All of above
View Answer
3. Which are the Shift operators ?
A. >>>
B. >>
C. <<
D. All of Above
View Answer
4. Which are the relational operators ?
A. < <=
B. > >= instanceof
C. == !=
D. All of Above
View Answer
5. Which are the bitwise operators ?
A. &
B. ^
C. |
D. All of Above
View Answer
6. Which are the logical operators ?
A. &&
B. ||
C. All of above
D. None of Above
View Answer
7. Which are the ternary operators ?
A. ? :
B. ++
C. All of above
View Answer
8. Which are the assignment operators ?
A. = += -= *= /= %=
B. &= ^= |=
C. <<= >>= >>>=
D. All of Above
View Answer
9. What is the right output of this program ?
A. 6765
B. 5654
C. 5775
D. 5765
View Answer
10. What is the right output of this program ?
A. 4,32
B. 32,4
C. 16,4
D. 4,16
View Answer