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
What is the difference between a checked and an unchecked exception?
What is passed by reference and pass by value ?
What is java thread dump, how can we get java thread dump of a program?
What are accessor methods in java?
What are methods and how are they defined?
What are selection structures?
Explain about exception propagation?
What is the largest data type in java?
What is return in java?
What is the use of generics? When was it added to the Java development Kit?
How can I become a good programmer?
What are advantages and disadvantages of OOPs?
What is the difference between interface & abstract class?
How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?
Can there be an abstract method without an abstract class?