Murach's Java SE 6
How to validate input data

Invalid data is a common cause of the exceptions (errors) that occur when a Java program is run. So this chapter introduces you to handling those types of exceptions. It also shows you how to code methods that check input data for common errors, so you can prevent exceptions from occurring.

Chapter 5 How to validate input data
How to handle exceptions 154
How exceptions work 154
How to catch exceptions 156
The Future Value application with exception handling 158
How to validate data 160
How to prevent exceptions from being thrown 160
How to validate a single entry 162
How to use generic methods to validate an entry 164
The Future Value application with data validation 166
The console 166
The code 168




Murach's Java SE 6

Learn more about this book

Add this book to your cart



Our Ironclad Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a full refund...no questions asked.