Skip to content
Sharp

Core Java · interview question

What does the expression '50 + 30 * 2' in Java evaluate to?

Multiple choiceMediumchapter-1-curatedpremiumcore-javaoperators-and-expressions
Choose one answer
Answer and explanation

Correct answer

C. 80

Why

According to operator precedence, multiplication is performed before addition. Thus, '30 * 2' is evaluated first, resulting in 60, and then 50 is added, resulting in 110.

Test yourself on Core Java

A free test with instant, explained results. No account needed.

Start free test
All Core Java questions →