Describe a technique for handling related exceptions.
What will be an ideal response?
Create a base class for all related exceptions. From the base class, derive related exception classes. Once the exception class hierarchy is created, all exceptions from the hierarchy can be caught as the base class exception type.
You might also like to view...
In UNIX, the process table is set up when the process is created and is deleted when the process terminates.
Answer the following statement true (T) or false (F)
What is wrong in the following program?
``` public class Test { public static void main (String[] args) { try { System.out.println("Welcome to Java"); } } } ``` a. You cannot have a try block without a catch block. b. You cannot have a try block without a catch block or a finally block. c. A method call that does not declare exceptions cannot be placed inside a try block. d. Nothing is wrong.