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
Do you know why doesn't the java library use a randomized version of quicksort?
What is private static class in java?
What is java english?
why java does not support unsigned keyword?
Can singleton class be inherited in java?
Can you add null to a list java?
How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?
Do we have pointers in java?
What is a memory leak in java?
What is the purpose of main function in java?
How do you check if a string is lexicographically in java?
Is main a function?
What is the use of put method?
What is final modifier?
What are benefits of java?