Dexian interview question

OOPS, Logical program, Try catch block