how to make a un-checked exception as a checked exception one.
Answers were Sorted based on User's Feedback
Answer / janardhan
If a client can reasonably be expected to recover from an
exception, make it a checked exception. If a client cannot
do anything to recover from the exception, make it an
unchecked exception.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / suvarna
Wrapping Checked Exceptions in Unchecked Exceptions
try {
// ... some code that could throw IOException or
RemoteException
} catch(Exception ex) {
throw new RuntimeException(ex.toString());
}
| Is This Answer Correct ? | 1 Yes | 2 No |
What does index mean in java?
What is meant by anonymous class?
Can we pass null as argument in java?
Can a class be defined inside an interface?
Java support call by reference (pass by reference) ?
Why do we need wrapper class?
Define an abstract class with reference to java.
What are the advantages of assembly language?
What is stream api in java8?
What are the two ways in which thread can be created?
Is vector thread safe in java?
What is your platform’s default character encoding?