How does a try statement determine which catch clause
should be used to handle an exception?
Answers were Sorted based on User's Feedback
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 |
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 |
What is the difference between error and exception and explain in simple words not whatever is given in the book.
Which package is imported by default?
How do you escape in java?
Name few java.lang classes introduced with java 8 ?
Explain Public static void main?
How to connect to a remote database using Applet?
Explain throw keyword in java?
Explain role of constructor in a java application?
Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?
How can you set an applet’s height and width as a percentage?
What are the differences between processes and threads?
What is a class variable?