New to Java? We'll help you get started with our revised beginner's tutorial, or our free online textbook.
Get the latest Java books
h t t p : / /w w w . j a v a c o f f e e b r e a k . c o m /
Correctness and Robustness
COMPUTER PROGRAMS THAT FAIL are much too common. Programs are fragile. A tiny error can cause a program to misbehave or crash. Most of us are familiar with this from our own experience with computers. And we've all heard stories about software glitches that cause spacecraft to crash, telephone service to fail, and, in a few cases, people to die.
Programs don't have to be as bad as they are. It might well be impossible to guarantee that programs are problem-free, but careful programming and well-designed programming tools can help keep the problems to a minimum. This chapter will look at issues of correctness and robustness of programs. We'll also look at exceptions, one of the tools that Java provides as an aid in writing robust programs.
Contents of Chapter 9:
- Section 1: Introduction to Correctness and Robustness
- Section 2: Writing Correct Programs
- Section 3: Exceptions and the try...catch Statement
- Section 4: Programming with Exceptions
- Programming Exercises
- Quiz on this Chapter
[ First Section | Next Chapter | Previous Chapter | Main Index ]