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
What is java objectoutputstream?
What are filterstreams?
What is the hashcode () and equals () used for?
What is a char in java?
Does java support multiple inheritance or not?
Is class forname reflection?
What is compareto?
What are the differences between Java 1.0 and Java 2.0?
What is the symbol for line break?
Where is core java used?
What is getclass () getname () in java?
What are static blocks and static initalizers in java ?
What are "methods" and "fields"?
When super keyword is used?
Who is the owner of java?