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 default methods ?
Which class has no duplicate elements?
How java enabled high performance?
What programs use java?
Is 0 an even number?
What is the use of beaninfo?
Can It is possible to synchronize the constructor of a Java Class?
Can a abstract class be declared final?
What is passing by reference in java?
how can i use a nonsynchronized hashtable?
What is a 16 bit word?
Explain the scope or life time of class variables or static variables?