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 are different access specifiers in java?
What is command line argument
Is age discrete or continuous?
What are the main differences between the java platform and other platforms?
What is an abstract class and what is it’s purpose?
Which is better list or arraylist in java?
What are generic methods?
What is anti pattern in java?
What is the difference between static and global variables and also define what are volatile variables?
What is mysql driver class name?
What are the disadvantages of using inner classes?
What do you mean by platform independence? What is an interface?
what is inner class in java?
Why is boolean important?
how many types of Inheritance?