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 cannot override static method?
Where pragma is used?
What is the generic class?
Can a final variable be null?
What is static variable with example?
How does multithreading take place on a computer with a single cpu?
Can we overload run() method in java?
What are the data types supported by java?
What are the different access modifiers available in java?
What does java ide mean?
Is null a value?
What is the use of callablestatement?
Explain about varargs in java?
What is passing parameters in java?
Can we sort hashmap in java?