menu

Java Operators


1. Which of the following operators is used to compare two values for less than or equal to?

!=

==

>=

<=


2. What is the result of the expression 10 / 3.0?

3.333333

3

4

3


3. What is the result of the expression (2 + 3) * 4?

20

25

14

8


4. Which of the following operators is used to compare two values for not equal to?

!=

==

>=

<=


5. Which of the following is the correct operator for equality testing?

=

==

!=

>


6. What is the result of the expression 5 > 3 && 4 < 6?

1

0

1

0


7. Which of the following operators is used to compare two values for inequality?

!=

==

>=

<=


8. Which of the following is the correct operator for division?

+

-

*

/


9. What is the result of the expression 5 * 2 + 3?

11

13

15

16


10. Which of the following operators is used to perform a bitwise right shift operation?

<<

>>

&

|