what is difference between throw and throws in exception?
Answer Posted / manu
throw: It is used to explicitly or manually throw an
exception.it can throw user defined exceptions.
throws:It tells that exception to b handled by calling
function. It tells caller that what exception that method
could throw.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What methods are used to get and set the text label displayed by a button object?
What are the topics in advance java?
Which variables are stored in heap?
What is constructor in java ?
Which is better singleton or static class?
how does the run() method in runnable work? : Java thread
Who is founder of java?
What is the epoch date?
What is the static method?
What modifiers may be used with a top-level class?
How to disable caching on back button of the browser?
Give me example of derived data types.
Can you have two constructors in java?
What is visibility mode?
If A Class Is Declared Without Any Access Modifiers, Where May The Class Be Accessed?