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

Difference between Web-based applications,Client- Server applications and Distributed applications?

3 Answers   Infosys,


Does java allow overriding static methods ?

0 Answers  


What is java life cycle?

0 Answers  


how to create multithreaded program? Explain different ways of using thread? : Java thread

0 Answers  


Which variable is the independent variable?

0 Answers  






How is java created?

0 Answers  


What is the difference between Array and Hash Table?

0 Answers   Impetus,


Is java hashset ordered?

0 Answers  


Can you add null to a list java?

0 Answers  


what is the purpose of class "Object" which is base class for all classes?

3 Answers  


List methods available in Java Queue interface

1 Answers  


What is basic syntax?

0 Answers  


Categories