Skip to content
Sharp

Core Java · interview question

Which approach is the best fit to store a product's SKU (Stock Keeping Unit) in Java?

Multiple choiceMediumchapter-1-curatedpremiumcore-javavariables-and-data-types
Choose one answer
Answer and explanation

Correct answer

D. String

Why

A product SKU typically consists of alphanumeric characters, making 'String' the most suitable data type to store it.

Test yourself on Core Java

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

Start free test
All Core Java questions →