what is difference between throw and throws in exception?
Answer Posted / lokesh
throws is used for throwing an exception from a method to
jvm, the jvm should handle it.where us throw is used when
user needs to raise his own exception.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Can we override protected method in java?
What is the effect of keeping a constructor private?
How can I right-justify a string?
What is the purpose of an interface?
What is substring in java?
How to stop a thread in java? Explain about sleep () method in a thread?
In java how do we copy objects?
What are multiple inheritances? Is it supported by java?
What is the best way to findout the time/memory consuming process?
How is string immutable in java?
Why do we need wrapper classes?
What does || || mean in math?
What is busy spin, and why should you use it?
What is anti pattern in programming?
What is the purpose of nested class in java?