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 string and its types?
What is the difference between static synchronize() metod and synchronize() method?
What are wrapper classes?
What are JVM.JRE, J2EE, JNI?
Which number is denoted by leading 0x or 0x in java?
Is sizeof a preprocessor?
What are identifiers in java?
What is java class writing rules?
What are the 3 types of control structures?
hi am an engineering student and my next plan is for ms in either in us or australia i got my passport but i dont know anything bout visa can u give brief idea 1)How to get prepared for visa and 2)How to apply for top universities and 3)How to pay the fee and so on These all are basic questions plz give me a clear idea
What are basic keywords?
Where import statement is used in a java program?