what is difference between throw and throws in exception?
Answer Posted / gourav shivhare
The throw keyword denotes a statement that causes an exception to be initiated. It takes the Exception object to be thrown as an argument. The exception will be caught by an enclosing try-catch block or propagated further up the calling hierarchy. The throws keyword is a modifier of a method that denotes that an exception may be thrown by the method. An exception can be rethrown.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Is static a keyword in java?
What are pass by reference and pass by value?
What is the use of http-tunneling in rmi?
What is the difference between int and integer in java?
You're given a Boolean 2D matrix, can you find the number of islands?
How big is a gigabyte?
Can you use this() and super() both in a constructor?
How an object is serialized in java?
Can a class have more than one object?
Is it possible to compare various strings with the help of == operator?
How many boolean functions are there?
How do you use wildcards?
java program with complete 4 oops concepts implemented example
EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.
What is main difference between variable and constant?