what is difference between throw and throws in exception?
Answer Posted / srinath
throws keyword is used 2 delegate the responsibility of
exception handling 2 caller method where as throw keyword
used 2 hand over the creted customised excetion object 2
jvm 2 handle the excepion.
| Is This Answer Correct ? | 33 Yes | 7 No |
Post New Answer View All Answers
Can you pass by reference in java?
Can memory leak in java?
What is the difference between error and an exception?
Why for each loop is used?
How do you remove an object from an arraylist in java?
In case of inheritance what is the execution order of constructor and destructor?
What 4 doubled?
Does java have extension methods?
How do you achieve singleton?
What will happen if static modifier is removed from the signature of the main method?
Can a list be null in java?
What are latest features introduced with java 8?
What loop means?
Difference between class#getinstance() and new operator ?
How do you sort arraylist in descending order?