Study 1Z0-831 Java 25 Files, Paths, Formatting, and Localization: key concepts, common traps, and exam decision cues.
These questions are usually won by contract reading, not by memorizing method names.
| If the stem is mainly about… | Better first instinct |
|---|---|
| path and file handling | check exact Files / Path return types and exceptions |
| auto-close behavior | think try-with-resources contract |
| localized output | locale-sensitive formatting and bundle lookup |
| serialization hints | check what is actually serialized or ignored |
| Trap | Better rule |
|---|---|
assuming every Files call returns a collection |
many return streams, paths, booleans, or throw |
| treating localization like raw string lookup only | locale and format behavior matter |
| forgetting resource closing order | try-with-resources rules still matter |