Hour 18. Handling Errors in a Program

No subject in this book is less popular than the one you're about to tackle: errors.

Errors—the various bugs, blunders, typos, and other problems that stop a program from running successfully—are a natural part of the software development process. “Natural” is probably the kindest word that has ever been used to describe them—in my own Java programming, when I can't find the cause of an elusive error that keeps my program from working, I use words that would make a gangsta rapper blush.

Some errors are flagged by the compiler and prevent you from creating a class. Others are noted by the interpreter in response to a problem that keeps it from running successfully.

There are two kinds of problems you will ...

Get SAMS Teach Yourself Programming with Java™ in 24 Hours, FOURTH EDITION now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.