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
Can we catch more than one exception in single catch block?
What is Major and importance difference between for and foreach loop ?
How do you invoke a method?
Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?
Does list maintain insertion order java?
How thread scheduler schedule the task?
Why do we need wrapper class?
What is a final class ?
Is set thread safe java?
What is meant by main method?
what is meant by Byte code concept in Java?
What is a function in programming?
Is null an object in java?
What are java threads?
Can a class have multiple constructors?