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
Define jre i.e. Java runtime environment?
What does %4d mean in java?
Detail discussions on JVM, memory management and garbage collector.
What is synchronization and why is it important in java programming?
Why Java doesn’t support multiple inheritance?
Which keyword specify that a variable is effectively final ?
Explain about arraylist?
Explain all java features with real time examples
How to perform selection sort in java?
What is string data type?
What's the base class of all exception classes?
Is there a case when finally will not execute?
What are the restrictions imposed by a Security Manager on Applets?.
What are the java ide’s?
What about features of local inner class?