how to make a un-checked exception as a checked exception one.

Answers were Sorted based on User's Feedback



how to make a un-checked exception as a checked exception one...

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

how to make a un-checked exception as a checked exception one...

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

Post New Answer

More Core Java Interview Questions

what is the use/perpose of having a method antive?

2 Answers  


What are the different types of collections in java?

0 Answers  


What is the largest number a double can hold?

0 Answers  


What is the default initialized value of String type variable?

4 Answers  


For class CFoo { }; what default methods will the compiler generate for you>?

0 Answers   Amazon,






Write a program to print count of empty strings in java 8?

0 Answers  


Explain about object oriented programming and its features?

0 Answers  


What is the use of a copy constructor?

0 Answers   Flextronics,


write a program to create an vector and listeterator.and value should be enter through keyboard.

1 Answers   Axcend,


From the two, which would be easier to write: synchronization code for ten threads or two threads?

0 Answers  


How do you compare two objects?

0 Answers  


What is subsequence of a string?

0 Answers  


Categories