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 much is a java license?
How can we handle runtime exceptions? write one sample program? Can we write runtime exceptions beside the throws key word? if yes write sample program?
Is java owned by oracle?
Can we overload destructor in java?
Why we override equals() method?
Name few java 8 annotations ?
What is the synonym of string?
What is the driver class?
How many wrapper classes are there in java?
What is compareto () in java?
where singleton classes are used in j2ee web application.can we use it for connection pooling.
What are default methods ?