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 maximum size of list in java?

1 Answers  


What is a parameter example?

1 Answers  


Is java hashset ordered?

1 Answers  


How to prevent a field from serialization ?

2 Answers  


Can java arraylist hold different types?

1 Answers  


What does next mean in java?

1 Answers  


what is Thread priority?

4 Answers   Tech Mahindra, Wipro,


garbate collector(GC)?

4 Answers  


How to change the priority of thread or how to set the priority of thread?

1 Answers  


What are library required to connect to excel sheet.

2 Answers   Cap Gemini,


Why do we create public static method in java?

1 Answers  


How to reduce flicking in animation?

3 Answers   TCS,


Categories