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
Difference between a process and a program?
Can interface be private in java?
Why is String immutable?
What is a jagged array in java?
How do you get the length of a string in java?
What occurs when an object is constructed?
How would you dynamically allocate memory to an array?
What is a control variable example?
What is extension method in java?
Objects or references which of them gets garbage collected?
What is public/private protected in java?
How many types of exception can occur in a java program?
Can you explain the cs option of java interpreter?
Explain importance of inheritance in java?
What is run time allocation?