Skip to content
Sharp

Core Java · interview question

How can you represent a fixed percentage discount in Java?

Multiple choiceMediumchapter-1-curatedpremiumcore-javanumeric-types-and-money-basics
Choose one answer
Answer and explanation

Correct answer

B. 0.20

Why

A fixed percentage discount should be represented as a decimal value, such as 0.20 for a 20% discount, allowing it to be used directly in calculations.

Test yourself on Core Java

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

Start free test
All Core Java questions →