what is difference between throw and throws in exception?
Answer Posted / ravikumar
Throws - what ever the exception you are declaring are
taken care by JVM. If it is a user defined exception in throws
block, JVM doesn't know when to throw that exception . For
this purpose we use Throw for a certain conditions/logic to
throw these user defined exceptions
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How does the garbage collector works in java?
Can we overload final method in java?
What is arrays sort in java?
What are the 3 types of control structures?
What does opcode mean?
Can we use string in the switch case?
What do the thread?class methods run() and start() do?
Why is multithreading important?
How garbage collection is done in java?
What is character in data type?
Define iterator and methods in iterator?
Do you know why doesn't the java library use a randomized version of quicksort?
Difference between static binding and dynamic binding?
Can array grow dynamically in java?
How is it possible for two string objects with identical values not to be equal under the == operator?