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

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

Joneshwar
Views: 1022 | Community Opinion: 1

Tags..  Java Interview  Core Java  Try Statement

Bookmark this page..



Ask a New Question Go to Home

Community Opinion/Answers
 
Poonam Said..

When an exception is thrown within the body of a try statement, 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 executed. The remaining catch clauses are ignored.






What do you think? Add your opinion/answer
*Name
*your opinion/answer: