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

Is singleton a bad practice?

0 Answers  


Why is method overloading not possible by changing the return type in java?

0 Answers  


What is the use of 'super' keyword inside a constructor?

0 Answers   Flextronics, Thomson Reuters, Virtusa,


How many types of operators are there?

0 Answers  


What is qms certification?

0 Answers  


What is class and object in java?

0 Answers  


Can an interface have a class?

0 Answers  


Does java runtime require a license?

0 Answers  


What is array list in java?

0 Answers  


I am a fresher and know core java, c languge, html, css etc if I am illegible for any job then send it on my email tatranakshay276@gmail.com

0 Answers  


Does constructor creates the object ?

0 Answers  


What is the final field modifier?

0 Answers  


Categories