what is difference between throw and throws in exception?
Answer Posted / chandrakala
throw and throws are clauses.
throws: if we are not interested to catch the exception then we have to use throws. if any exception arises then internally JVM handles that exception.
throw: If we want to throw an exception explicitly we have to use throw.It comes under user defined exception.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain the significance of listiterator.
Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?
What is the purpose of the System class?
Do extraneous variables affect validity?
What is method reference?
Where is the find and replace?
What is exception handling in java?
Can vector have duplicates in java?
What is math floor in java?
Is space a char?
Write a program to check for a prime number in java?
How many bits is a string in java?
Can inner class extend any class?
What are the parts of a method?
A person says that he compiled a java class successfully without even having a main method in it? Is it possible?