Skip to content
Preview · sample content · Explore all pages

Advanced Java

Continue with exceptions, generics and concurrent work.

Advanced Java work combines type contracts, resource ownership, and execution boundaries. The difficult failures often come from a mismatch between those boundaries rather than from syntax.

Types before casts

Start with generics and wildcard bounds, then make failure handling explicit. Use Optional for defined absence, not as a way to hide an I/O error.

Execution and ownership

A stream pipeline is not a collection copy, and a lambda is not automatically asynchronous. Keep file handles and worker lifetimes scoped to an owner that can close them.

Common Mistakes

Do not add concurrency before measuring the workload and choosing an admission policy. Do not describe an unbounded queue as safe because the worker count is fixed.

Curriculum

Storage details