J.I · Java 25 practice question

How many specific conversions on primitive types are defined as narrowing primitive conversions in Java 25?

Choose one answer
Check answer and explanation

Correct answer: 22

Explanation

The Java Language Specification defines exactly 22 specific conversions on primitive types as narrowing primitive conversions.

Common trap

19 is the count of widening primitive conversions, not narrowing primitive conversions. 28 overcounts by including conversions that are not classified as narrowing primitive conversions.

Source: JLS SE 25 §5.1.3. Narrowing Primitive Conversion
Checked against the cited text on 2026-11-25.

Report an error in this question