October 2022
Intermediate to advanced
576 pages
15h 37m
English
Topics in This Chapter
In many programs, dealing with the unexpected can be more complex than implementing the “happy day” scenarios. Like most modern programming languages, Java has a robust exception-handling mechanism for transferring control from the point of failure to a competent handler. In addition, the assert statement provides a structured and efficient way of expressing internal assumptions. Finally, you will see how to use the logging API to keep a record of the various events, be they routine or suspicious, in the execution of your programs.
The key points of this chapter are:
When you throw an exception, control is transferred ...
Read now
Unlock full access