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 does split function do in java?
Explain the difference between abstract classes and interfaces in java?
What is a class component?
What is the use of generics? When was it added to the Java development Kit?
What are the two basic ways in which classes that can be run as threads may be defined?
Why do we need strings in java?
Can we have any other return type than void for main method?
What is the class in java?
What are the advantages of functions?
why would you use a synchronized block vs. Synchronized method? : Java thread
What is the escape character in java?
What are the differences between abstract class and interface?
What is the meaning of variable in research?
What type of value does sizeof return?
What are the benefits of java?