What is the purpose of the finally clause give an example


Problem

1. What is the purpose of the finally clause? Give an example of how it can be used.

2. What happens when an exception is thrown, the code of a finally clause executes, and that code throws an exception of a different kind than the original one? Which one is caught by a surrounding catch clause? Write a sample program to try it out.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: What is the purpose of the finally clause give an example
Reference No:- TGS02628430

Expected delivery within 24 Hours