How does a try statement determine which catch clause
should be used to handle an exception?

Answers were Sorted based on User's Feedback



How does a try statement determine which catch clause should be used to handle an exception?..

Answer / guest

when an exception is thrown with in the body of the try
statement then the catch clauses of the try statement are
examined in the order in which they appear.The first catch
clause that is capable of handling the exception is caught
and the remaining are ignored.

Is This Answer Correct ?    8 Yes 0 No

How does a try statement determine which catch clause should be used to handle an exception?..

Answer / vatti

when an exception is thrown from the try block,the type of
exception object specified in the catch statement matches
with the exception thrown, that one will execute

Is This Answer Correct ?    5 Yes 1 No

Post New Answer

More Core Java Interview Questions

In what ways you can handle exception ?

3 Answers  


Explain about serializable interface in java?

0 Answers  


How can I become a good programmer?

0 Answers  


What are java packages?

0 Answers  


What does this () mean in java?

0 Answers  






if a java file without any source code is valid java file?

3 Answers   SparkTG,


How do you sort a set in java?

0 Answers  


what is the Arraylist limit (maximum) by default ?

13 Answers   Fidelity, PlanetSoft, Wipro,


What is thread life cycle in java?

0 Answers  


Is java jre still free?

0 Answers  


Why main() method is public, static and void in java ?

0 Answers  


Can we have multiple public classes in a java source file?

0 Answers  


Categories