Skip to content
Sharp

Core Java · interview question

Which condition will correctly apply free shipping if 'cartTotal' is greater than or equal to 50?

Multiple choiceMediumchapter-1-curatedpremiumcore-javaconditions-and-branching
Choose one answer
Answer and explanation

Correct answer

D. If (cartTotal >= 50) {}

Why

The condition 'cartTotal >= 50' checks if the total is 50 or more, which is the threshold for free shipping.

Test yourself on Core Java

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

Start free test
All Core Java questions →