O'Reilly logo

Sams Teach Yourself Java in 21 Days, Sixth Edition by Rogers Cadenhead

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Day 7. Exceptions and Threads

Your first week in the Java language ends with two of its most useful elements, threads and exceptions.

Threads are objects that implement the Runnable interface or extend the Thread class, indicating that they can run simultaneously with other parts of a Java program. Exceptions are objects that represent errors that may occur as a Java program runs.

Threads enable programs to make efficient use of resources by isolating the computing-intensive parts of a program so that they don’t slow down everything else. Exceptions enable programs to recognize errors and respond to them. Exceptions even make it possible for programs to correct the conditions and continue running, when possible.

Exceptions are covered first because ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required