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 is the java virtual machine?
How do you reverse sort in java?
Why use string handling in Java?
Can we override constructor?
How do you trim a space in java?
Why put method is used?
What language is an assembler written in?
State two differences between C and Java.
what is session in java?
What is the difference between a window and a frame in java programming?
What is the output of the below java program?
What are java methods?
What is java argument list?
What is immutable data?
When will you define a method as static?