In this chapter, you learned about checked exceptions and unchecked exceptions. Checked exceptions prevent arithmetic overflow conditions from entering any production code as they are trapped at compile time. Unchecked exceptions go unchecked at compile time and can often make it into production code. This can lead to some hard-to-track-down bugs in your code through unexpected data values and even result in exceptions being thrown that cause your programs to crash.
You then learned about the common NullPointerException and how to validate parameters that have been passed in using custom Attribute and Validator classes, which are placed at the top of your methods. These allow you to provide meaningful feedback when validation fails. This leads to more robust programs in the long run.
Then, we discussed using BREs to control program flow. You were shown how to control the program flow by expecting exceptional output. Then, you saw how to achieve better control...