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 is argument in java?
How do you take thread dump in java?
What makes a function well defined?
Compare Mutex and Semaphore in java.
Can we declare the static variables and methods in an abstract class?
Is singleton set an interval?
what is an object and how do you allocate memory to it?
Java does not support multiple inheritance. how interface helps in the same?
Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?
What is the meaning of immutable regarding string?
What is a java developer salary?
Who is the owner of java?