Module 05 of 10

Exceptions, I/O & Concurrency

Lessons

About This Module

Real programs don't run in a perfect world. Files go missing, input is invalid, and work needs to happen in more than one place at once. This module covers the three skills that make Java code robust: handling errors, working with files, and running tasks concurrently.

You'll start with exceptions: the difference between checked and unchecked errors, try/catch/finally, try-with-resources, and when to throw your own. Next comes file I/O, reading and writing data with the classic streams and the modern NIO API. Then you'll move to concurrency: threads, ExecutorService for managing thread pools, and CompletableFuture for chaining asynchronous work.

With these in place, you'll be ready for the next module, Build Tools, Git & Testing, where you'll start organizing and verifying real projects.

Lessons

4 videos
01

Exception Handling in Java

Types of exceptions, try/catch/finally, try-with-resources, and the throw and throws keywords.

02

How to Easily Read and Write to Files in Java

A few ways to read and write text files in Java, and when to use each.

03

Java Multithreading in One Shot

Threads, Runnable, Callable, ExecutorService, and CompletableFuture covered from the fundamentals up.

04

Java 8 CompletableFuture Tutorial with Examples

A closer look at CompletableFuture and its methods for running and chaining asynchronous tasks.