Q. Which of these is a correct way to handle multiple exceptions?

A
try { } catch (Exception e) { }
B
try { } catch (Exception1 e1) { } catch (Exception2 e2) { }
C
try { } finally { }
D
catch { } try { }
Solution:

Multiple catch blocks can handle different exception types thrown in a try block.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!