menu

Java Operators


1. Which of the following operators is used to concatenate two strings?

+

-

*

/


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

&

&&

|

||


3. What is the result of the expression 5 / 2?

2.5

2

2

3


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

Hello World

HelloWorld

Hello+World

HelloWorld!


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

+

-

*

/


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

1

0

1

0


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

+=

++

--

*


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

+

-

*

/


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

1

0

1

0


10. What is the result of the expression true || false?

1

0

1

0