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



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

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

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

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

Post New Answer

More Core Java Interview Questions

What is thread priority?

1 Answers   Tech Mahindra,


how to deploy apache tomcat server to weblogic server in java

0 Answers   IBM,


What is interface and its use?

8 Answers   HCL,


where final and static variable stored?

3 Answers  


Is string serializable in java?

0 Answers  






What does bitwise or mean?

0 Answers  


What is printwriter in java?

0 Answers  


What interface is extended by awt event listeners?

0 Answers  


Explain yield() method in thread class ?

0 Answers  


What is the purpose of using java.lang.class class?

0 Answers  


What is sortedmap interface?

0 Answers  


Can we override constructor?

0 Answers  


Categories