Infosys Interview Question

basics oops,exceptions