Previous Next |
Hour 18. Handling Errors in a ProgramNo subject in this tutorial 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 encounter in Java:
During this hour, we'll explore exceptions as the following topics are discussed:
You'll also learn how to keep errors out of your programs using a language feature called assertions. |
Previous Next |