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 |
What is thread priority?
how to deploy apache tomcat server to weblogic server in java
What is interface and its use?
where final and static variable stored?
Is string serializable in java?
What does bitwise or mean?
What is printwriter in java?
What interface is extended by awt event listeners?
Explain yield() method in thread class ?
What is the purpose of using java.lang.class class?
What is sortedmap interface?
Can we override constructor?