Explore BrainMass
Share

Catching Exception Using Class Exception - Java

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

Write a program that demonstrates how various exceptions are caught with

catch (Exception exception)

This time, define classes ExceptionA (which inherits from class Exception) and ExceptionB (which inherits from class ExceptionA). In your program, create try blocks that throw exceptions of types ExceptionA, ExceptionB, NullPointerException and IOException. All exceptions should be caught with catch blocks specifying type Exception.

© BrainMass Inc. brainmass.com December 19, 2018, 11:40 pm ad1c9bdddf
https://brainmass.com/computer-science/operating-systems/catching-exception-using-class-exception-java-126946
$2.19