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

real time example for deadlock,starvation,livelock

5 Answers  


Is void a data type in java?

0 Answers  


List the different types of classloaders in java.

0 Answers  


What is formatted output?

0 Answers  


Is null a string or object in java?

0 Answers  






What is square root in java?

0 Answers  


What is java abstraction with example?

0 Answers  


What is the program development process?

0 Answers  


23. Storage space in java is of the form Stack Queue Heap List 24. What is java code embedded in a web page known as Applets Servlets scriptlets snippets 25. Which of the following attributes are compulsory with an <applet> tag?. code,height & width. 26. What does 'CODEBASE' in an applet tag specify?. Files absolute path.

0 Answers   TCS,


What is string manipulation?

0 Answers  


Define max and min heap, also the search time of heap.

0 Answers   GrapeCity,


Why do we use string?

0 Answers  


Categories