Handling Exceptions in Java

This video gives a Java example of an exception handler using 'throw' and 'catch' blocks. It is a brief review of the previous discussion. An exception is a runtime error that interrupts the execution of a program statement. When an exception occurs, the runtime system transfers control to either a runtime routine that handles the exception by printing a message and then terminating the program or to a programmer-provided routine that handles the exception by executing instructions that take corrective action. This video gives a Java example of an exception handler using 'throw' and 'catch' blocks. 


Source: Cave of Programming, https://www.youtube.com/watch?v=yqwQQnUW3p8
Creative Commons License This work is licensed under a Creative Commons Attribution 3.0 License.

Last modified: Sunday, January 29, 2023, 4:17 PM