how to make a un-checked exception as a checked exception one.
Answer Posted / 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 |
Post New Answer View All Answers
What is the null?
What is finalize()? Is finalize() similar to a destructor?
Can final class have constructor?
What all access modifiers are allowed for top class ?
Why declare Main() inside the class in java ?
What is canonical name in java?
What is static synchronization?
What is jee6?
What is ‘has a’’ relationship in java?
What is meant by class?
What things should be kept in mind while creating your own exceptions in java?
What is the final method?
What is a byte array?
What is byte code and why is it important to java’s use for internet programming?
What is an anonymous class in java?