how to make a un-checked exception as a checked exception one.
Answers were Sorted based on User's Feedback
Answer / janardhan
If a client can reasonably be expected to recover from an
exception, make it a checked exception. If a client cannot
do anything to recover from the exception, make it an
unchecked exception.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / 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 |
What about interthread communication and how it takes place in java?
Tell me how many ways are there to initialise an integer with a constant.
What is an immutable object?
How can I debug the Java security exceptions and AccessControlExceptions?
Why null value is used in string?
What is temp in java?
What are field variable and local variable?
Given a singly linked list, determine whether it contains a loop or not without using temporary space?
Are global variables initialized to zero?
What is the difference between yielding and sleeping in java programming?
What is time complexity java?
How to perform merge sort in java?