menu

Java Operators

Java Operators - Important Points


6. Which of the following is the correct operator for multiplication?

A. +

B. -

C. *

D. /

Discuss Work Space

Answer: option c

Explanation:

The * operator is used for multiplication in Java. The + operator is used for addition.

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

A. 1

B. 0

C. 1

D. 0

Discuss Work Space

Answer: option a

Explanation:

The && operator is the logical AND operator. Both operands must be true for the result to be true.

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

A. +

B. -

C. *

D. /

Discuss Work Space

Answer: option b

Explanation:

The - operator is used for subtraction in Java. The + operator is used for addition.

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

A. 2.5

B. 2

C. 3

D. 2

Discuss Work Space

Answer: option b

Explanation:

Integer division truncates the result, so 5 / 2 gives a result of 2.

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

A. +

B. -

C. *

D. /

Discuss Work Space

Answer: option a

Explanation:

The + operator is used to concatenate two strings in Java.


Subscribe for Latest Career Trends
Subscribe Now
Use AI and ChatGPT for Career Guidance

Unlock Your Future

Join Now
Worried for Placements in 2024?

Join FAST TRACK Course

Join Now
Supercharge Your SUCCESS

Join All in One Placement Mock Tests-2024

Join Now