O'Reilly logo

Sams Teach Yourself Java™ 6 in 21 Days by Laura Lemay, 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

Chapter 7. Exceptions, Assertions, and Threads

Today, you complete your weeklong journey through the Java language by learning about three of its most useful elements: threads, exceptions, and assertions.

Threads are objects that implement the Runnable interface, which indicates that they can run simultaneously with other parts of a Java program. Exceptions are objects that represent errors that may occur in a Java program. Assertions are conditional statements and Boolean values that indicate a program is running correctly, providing another means of detecting errors.

Threads enable your programs to make more efficient use of resources by isolating the computing-intensive parts of a program so that they don’t slow down the rest of the program. ...

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