Java Reference
In-Depth Information
Handling Exceptions and
Debugging
What you Will learn in this chapter:
What kinds of errors can occur in programming
How to find errors in your program
How to handle exceptions that could crash your program
How to test your program
Wrox.com code doWnloads for this chapter
The wrox.com code downloads for this chapter are found at www.wrox.com/go/
beginningjavaprogramming on the Download Code tab. The code is in the Chapter 6
download and individually named according to the names throughout the chapter.
You are now midway through this topic. You've learned the basics of Java and program-
ming already. In the following chapters, you'll be going more in depth with object‐oriented
programming and interacting with users and data sources outside your Java program. This
chapter is placed in between to offer you the tools and techniques needed to handle many of
the errors that might begin to pop up as your programs start to become more complex. The
chapter is divided into three main sections: types of errors, testing options, and programming
styles. You saw the concepts introduced as early as Chapter 1, but here you will see actual
solutions put into practice with a chance to try them out on your own. By the end of this chap-
ter, you should have developed the skills to avoid errors while you program and to find and fix
the errors that will still inevitably occur.
 
Search WWH ::




Custom Search