Skip to content
Sharp

Core Java · interview question

In which case would using a primitive type over a wrapper type be more appropriate?

Multiple choiceEasychapter-7-curatedpremiumcore-javawrapper-types-and-autoboxing
Choose one answer
Answer and explanation

Correct answer

A. When null values are not necessary

Why

Primitive types are appropriate when null values are not necessary, as they do not support null and are more efficient in terms of memory and performance.

Test yourself on Core Java

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

Start free test
All Core Java questions →