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 |
How to create an immutable class?
What happens when you add a double value to a string?
Define the term string pool?
Which method cannot be overridden in java?
From the two, which would be easier to write: synchronization code for ten threads or two threads?
What is meant by class loader? How many types are there? When will we use them?
What’s the difference between constructors and other methods?
What happens if constructor is private?
what is Remote Reference Layer ?
Relationship between an event-listener interface and an event-adapter class?
What is the association?
What is hard code & soft code?