What is the relationship between a method?s throws clause
and the exceptions that can be thrown during the method?s
execution?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / chinu
Throws is used in the method definition to mark what all
exceptions the method can throw, so that the code that
accesses the method can give the corresponding catch block
for that exception.
| Is This Answer Correct ? | 0 Yes | 0 No |
How do you differentiate abstract class from interface?
Which is faster call by value or call by reference?
Can we sort array in java?
What is boolean keyword in java?
How do you use spaces in java?
where lives in jvm
Explain different types of wrapper classes in java?
Explain about Superclass and Subclass?
What is better- service oriented or batch oriented solutions?
What is instance means in java?
What is map java?
How to use arraylist in java netbeans?