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

How many types of interfaces are there?

0 Answers  


How will you reverse a link list without using recursion?

0 Answers   Global Logic,


Hi i am creating desktop application in that i want calling to mobile number. i have java telephone api (JTAPI) but i dont understand how it configure & use plese help me

0 Answers  


What are some characteristics of interference class?

0 Answers  


What is the exact difference in between unicast and multicast object? Where we will use?

0 Answers  


Why main method is static in java?

0 Answers  


Can you instantiate the math class?

0 Answers  


What is skeleton and stub? What is the purpose of those?

0 Answers  


What is the constructor?

0 Answers  


Given: 1. package test; 2. 3. class Target { 4. public String name = “hello”; 5. } What can directly access and change the value of the variable name? 1 any class 2 only the Target class 3 any class in the test package 4 any class that extends Target

7 Answers   Infosys, WW,


What is byte data type?

0 Answers  


What languages are pass by reference?

0 Answers  


Categories