Browse Oracle Certification Guides

1Z0-830 Java 21 Conversions, Strings, Operators, and var Guide

Study 1Z0-830 Java 21 Conversions, Strings, Operators, and var: key concepts, common traps, and exam decision cues.

Most early Java exam misses are not deep. They come from skipping one conversion rule, one immutable type rule, or one operator side effect.

Type-choice map

If the stem is mainly about… Better first instinct
primitive math and assignment legality trace widening, narrowing, and promotions explicitly
wrapper behavior watch for autoboxing, unboxing, and possible NullPointerException
string edits separate immutable String operations from mutable StringBuilder methods
var confirm it is a local variable with an initializer that makes the type obvious

What the exam is really testing

If the code shows… Strong reading
mixed primitives in one expression numeric promotion rules decide the result type
Integer used like int unboxing may happen, and null is now dangerous
repeated concatenation mutability and object creation may matter more than output intuition
compound assignment implicit cast behavior may differ from plain assignment

Common traps

Trap Better rule
assuming boxing is always the first legal conversion primitive widening often wins earlier in overload contests
using == to compare string content == compares references for objects
treating text blocks as a different runtime type a text block is still a String
using var for fields or uninitialized locals var is for local inference only

Quiz

Loading quiz…
Revised on Sunday, May 10, 2026