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 are the restrictions imposed by a Security Manager on Applets?.
What are scalar data types?
Explain the difference between abstract classes and interfaces in java?
waht happens when a return type ,even void is specified for a constructor?
What is the difference between serial and throughput garbage collector?
class A{ m2(){ } } class B extends A{ m2(){ } } class c extends B{ m2(){ } } class my_class extends c{ m2(){ } pulic static void main(){ ...My_class a = new my_class(); super.super.super.m2(); is this is leagal if not find what is the legal procedure in order to call A's version of m2(); }
Can a static method be final?
what are the rules to use try catch finally?
What is the importance in context in JDBC connection pools?
Explain 5 io best practices?
What is the functionality of the stub?
What is the transient keyword?