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
Why we go for collections in java?
What are default methods ?
Can you declare a private method as static?
What is the difference between class & structure?
What is class array in java?
Which of the classes will have more memory allocated?
Can interface be private in java?
Why does java not support pointers?
What loop means?
What are the differences between abstract class and interface?
What is meant by anonymous class?
What is a linkedhashmap java?
What is java used for?
Can we use different return types for methods when overridden?
What does || || mean in math?