menu

Java Operators


1. What is the result of the expression "Hello" + "World"?

Hello World

HelloWorld

Hello+World

HelloWorld!


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

%

/

//

*


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

1

0

1

0


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

!=

==

<=

>=


5. Which of the following operators is used to perform a bitwise AND operation?

&

&&

|

||


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

6

8

10

8


7. What is the result of the expression true && false?

1

0

1

0


8.

What is the result of the expression 6 % 4?

2

0

1

4


9. Which of the following operators is used to perform a logical OR operation?

&

&&

|

||


10. Which of the following is the correct operator for subtraction?

+

-

*

/