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
What are adapter classes?
What do you understand by classes in java?
Why does my function print none?
v-model life cycle
What is the difference between length and size in java?
What is static class
What is integer valueof?
What is a “stateless” protocol ?
Why java is considered as platform independent?
How objects of a class are created if no constructor is defined in the class?
Give us a program to check for parenthesis matching using stack.
Is there any tag in htm to upload and download files?
Write a program to reverse a number in java?
Does list allow duplicates in java?
Is void a data type?