What is the difference between throw and throws?
Answer Posted / balaji
throw:it is used to raise exception explicitly
that means it is use when a user defined exception is raised
throws:if a method is capable of throwing an exception but
it does not handle the exception that must be specified by
using "throws" class
| Is This Answer Correct ? | 23 Yes | 1 No |
Post New Answer View All Answers
How can I right-justify a string?
Explain the importance of throwable class and its methods?
Can java object be locked down for exclusive use by a given thread?
What are thread local variables?
What are exception handling keywords in java?
What is java in simple terms?
How can I become a good programmer?
What is integers and example?
Does java vector allow null?
How dead lock situation occurs in java and how you can identify it?
what is method reference in java 8?
what is ststic with example
What is parameters example?
how many types of Inheritance?
What is lambda in java?