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 constructor chaining in java?
What is the main use of generics in java?
all are saying java doesn't support multiple inheritance but by default Object class is super class for all the user defined classes and we can extend atmost one class so each class can extend more than one class so java supports multiple inheritance?i am confused with this,pls any one explain me.
Can we catch more than one exception in single catch block?
What is a 16 bit word?
Does isempty check for null?
Write a program to create a binary Tree ?
Can we make constructors static?
What is variable length arguments in java?
what is overloading in java?
13 Answers Ascent, DNS, Infosys, SDA, VelTech,
what is the difference between System.exit() and System.exit(1)?
1 Answers eClinical Solutions, eClinical Works, eClinicalWorks,
When do we use synchronized methods in java?