What is the relationship between a method?s throws clause
and the exceptions that can be thrown during the method?s
execution?

Answer Posted / ranganathkini

The throws clause of a method basically defines the types of
checked exceptions the method can throw during its
execution. This clause alerts the client code that invokes
the method that it has to have suitable try...catch blocks
to handle the checked execeptions.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List some oops concepts in java?

590


Can we define private and protected modifiers for variables in interfaces?

595


How we can skip finally block of exception even if some exception occurs in the exception block in java?

532


What is default size of arraylist in java?

567


What is classname class in java?

550






What is identifier in java?

570


what is abstract class in Java?

665


What is the exception hierarchy in java?

494


What is a numeric format?

578


Is java still necessary?

631


What is a string token?

546


What does it mean to be immutable?

560


Can a class be defined inside an interface?

570


What is difference between == equals () and compareto () method?

539


What class allows you to read objects directly from a stream in java programming?

522