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 difference between inheritance and encapsulation?

0 Answers  


Difference between ‘>>’ and ‘>>>’ operators in java?

0 Answers  


What is the purpose of premetive data types in java?

2 Answers   Merrill Lynch, TCS,


What are scalar data types?

0 Answers  


primitive data types in Java ?

3 Answers  






What is a reflection package?

2 Answers  


Explain enumeration in java?

0 Answers  


What is byte data type?

0 Answers  


What is java reflection?

0 Answers  


why is multiple inheritance not allowed in java?

7 Answers   Elementus Technologies, Huawei, Infosys,


What is return type in java?

0 Answers  


Explain about version control?

0 Answers  


Categories