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 benefit of singleton pattern?
What is treeset in java collection?
Why do we declare a class static?
How many bytes is double?
What is dynamic array in java?
Explain about version control?
What is primitive array?
What is preflight request?
Explain the difference between jvm and jre?
Define a java class.
What is bufferedwriter?
What are the advantages of java over C++?
Do you need to import math in java?
What is the generic function?
What is the difference between access specifiers and access modifiers in java?