04, 11 chapters
core apis and exceptions
everything.coreApi
core apis and exceptions
the standard library you use every day, and how errors move through a program.
- 04.01the string apiStringBuilder, formatting, compact strings and the methods worth knowing.
- 04.02wrappers and autoboxingint vs Integer, the integer cache, and why 127 == 127 but 128 != 128.
- 04.03math and random numbersMath, StrictMath, BigInteger, and RandomGenerator.
- 04.04exceptionsThrowable, Error, Exception. checked vs unchecked.
- 04.05try, catch, finallyhow an exception unwinds the stack, frame by frame.
- 04.06try-with-resourcesautomatic closing, in reverse order, with suppressed exceptions.
- 04.07designing with exceptionscustom exceptions, chaining, and translating across layers.
- 04.08optionala box that might be empty. idioms and anti-patterns.
- 04.09dates and timeInstant vs LocalDateTime vs ZonedDateTime, and daylight saving traps.
- 04.10regular expressionsPattern, Matcher, groups, and how backtracking can melt your cpu.
- 04.11loggingSystem.Logger, java.util.logging, SLF4J. levels and where logs go.