how does an exception permeate through the codean


How does an exception permeate through the code?

An unhandled exception moves up the method stack in search of a matching When an exception is thrown from a code which is wrapped in a try block followed by one or more catch blocks, a search is made for matching catch block. If a matching type is found then that block will be requested. If a matching type is not found then the exception moves up the method stack and reaches the caller method.

Same procedure is repeated if the caller method is contained in a try catch block. This process continues unless a catch block handling the appropriate type of exception is found. If it does not search such a block then finally the program terminates

 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: how does an exception permeate through the codean
Reference No:- TGS0310992

Expected delivery within 24 Hours