menu

Java Operators


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

1

0

1

0


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

+

-

*

/


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

!=

==

>=

<=


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

3.333333

3

4

3


5. Which of the following operators is used to increment a variable by 1?

+=

++

--

*


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

!=

==

>=

<=


7. What is the result of the expression (10 > 5) || (3 < 1)?

1

0

1

0


8. Which of the following operators is used to test if a variable refers to the same object as another variable?

!=

==

<=

>=


9.

What is the result of the expression 6 % 4?

2

0

1

4


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

&

&&

^

||