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
Compare overloading and overriding?
Can we create object of inner class in java?
What is the multi-catch block in java?
What are the different types of methodologies?
What is passing value java?
What is a boolean structure?
What are the important features of Java 10 release?
If we don’t want some of the fields not to serialize how to do that?
What if static is removed from main method?
What is the use of jtable?
What is type parameter in java?
What is the purpose of the main method?
Is empty in java?
What are untrusted applets?
What are the two basic ways in which classes that can be run as threads may be defined?