Browse Oracle Certification Guides

1Z0-829 Java 17 Access, Immutability, and Object Contracts Guide

Study 1Z0-829 Java 17 Access, Immutability, and Object Contracts: key concepts, common traps, and exam decision cues.

This chapter is where “clean design” becomes exam-scored behavior. If access or object contracts are wrong, the snippet often fails before business logic matters.

Object-contract map

If the stem is mainly about… Better first instinct
package boundaries and imports access level and package relationship matter first
safe immutable design check for defensive copies and mutable components
equality in collections or comparisons object contract behavior matters more than printing

What the exam is really testing

If the code shows… Strong reading
package-private access compile-time boundary issue
“immutable” class with mutable field contents true immutability may be broken
equals without hashCode reasoning contract consistency is likely the point

Common traps

Trap Better rule
thinking final alone makes an object immutable contained mutable state still matters
using identity intuition where equality is under test == and equals answer different questions
forgetting package structure affects accessibility imports do not override access rules

Quiz

Loading quiz…
Revised on Sunday, May 10, 2026