what is difference between throw and throws in exception?
Answer Posted / pavithra
throws is used to throw an exception from the method
without handling that exception where as 'throw' is used
to throw the exception to catch block and handle it.
Is This Answer Correct ? | 123 Yes | 79 No |
Post New Answer View All Answers
What is void keyword?
Why we override equals() method?
Is java 11 paid version?
Is it possible to specify multiple jndi names when deploying an ejb?
What is the intersection and union methods?
Are constructors methods?
In case of inheritance what is the execution order of constructor and destructor?
Can inner class have constructor?
What happens if an exception is not handled in a program?
What does the @override annotation do?
Is .net better than java?
What is use of set in java?
How do you escape a string?
What is the use of arraylist class in java?
What are the methods available in a class?