try block is throwing NullPointerException but the catch block is used to counter Arithmetic Exception. Hence NullPointerException occurs since no catch is there which can handle it, runtime error occurs.
finally keyword is used to execute before catch and try block is executed.
Output : B C
Exception handling is managed via 5 keywords “ try, catch, throws, throw and finally.