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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a singleton class in Java?

505


If you are given the name of the function at run time how will you invoke the function?

678


What are invisible components?.

1677


Explain try and catch keywords in java?

621


Can we serialize static variables in java?

653






Can a class be defined inside an interface?

563


What is sorting in java?

532


Explain the term virtual machine?

591


Explain about transient variables in java?

640


What is the method in java?

595


How objects are stored in java?

546


What does %d do in java?

578


What design pattern you have used in your project? I answered Factory pattern, how it is implemented? What are its advantage? Do know about Abstract Factory?

1935


What is a class in java?

580


What is the use of using enum to declare a constant?

555