Intermediate
Exceptions, I/O and Reflection
The parts of the standard library a backend leans on.
Checked versus unchecked exceptions as a design question, try-with-resources, the exception hierarchy a service should have, files and streams in NIO, and annotations and reflection — the machinery under every framework you use.
6 lessons written2 modules~1h reading
After this course you can
- Design an exception hierarchy for a service and know what to catch where
- Use try-with-resources correctly and explain suppressed exceptions
- Read and write files with NIO without leaking handles
- Explain what Spring does with reflection and annotations, and what it costs
Curriculum
6 lessons · outlined lessons show their plan01
Checked vs uncheckedThe hierarchy, the original intent, why most modern code prefers unchecked, and the rule that decides it for you.12 mintry-with-resources and cleanupAutoCloseable, suppressed exceptions, finally's foot-guns, and the resource leak that shows up as a connection pool exhausted at 3am.11 minException design for servicesA hierarchy with a business base, a technical base, and a translation layer at the edge — so a stack trace never reaches a client.12 minExceptions
02
Files and NIOPath, Files, buffered streams, charsets, and reading a large file without loading it — the API you actually use, not the 1998 one.11 minJSON and JacksonEvery getter is a property, unknown and missing fields, java.time without its module, and the id JavaScript rounded to a different record.12 minAnnotations and reflectionRetention, targets, reading annotations at runtime, proxies — and what it costs, so you know why Spring startup takes what it takes.13 min