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 iterator and list iterator?
What are scalar data types?
What is the meaning of I ++ in java?
What is the use of a copy constructor?
Say any two properties in beans?
What is the protected method modifier?
Explain the purpose of garbage collection in Java?
How do you take thread dump in java?
Explain the hierarchy of java exception classes?
How many bits are in a sentence?
What is the difference between a method and a procedure?
Is finalize() similar to a destructor?
Can a class be protected in java?
How we can run a jar file through command prompt in java?
Can a variable be local and static at the same time?