what is the Use of throws exception?
Answers were Sorted based on User's Feedback
Answer / ravikiran(aptech mumbai)
throws is used to throw the exception to it's calling method
| Is This Answer Correct ? | 14 Yes | 3 No |
it is used to throw the list of exceptions that a method
has to throw.
Syntax:
returntype methodname(list of args)throws
exception1,exception2{
body
}
| Is This Answer Correct ? | 15 Yes | 6 No |
What are the advantages of java over C++?
What is Hash Code in Java?
explain about casting of objects?
What are the advantages of the model over the event- inheritance model?
Can a class have 2 constructors?
Can we extend a class with private constructor?
How to perform merge sort in java?
What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?
What modifiers are used for interface declaration?
what is the purpose of method overriding in java where v r completely re-defining a inherited method instead y can't v create a new method and define.If the question is very silly plz excuse me and do reply.Thank U!
7 Answers emc2, Kumaran Systems,
What is the base class of all exception classes?
What is deserialization?