What is the difference between throw and throws?
Answer Posted / ranganathkini
The 'throw' statement initiates an exception to be thrown
where as the 'throws' clause declares that the method is
expected to throw 1 or more checked execptions.
| Is This Answer Correct ? | 43 Yes | 5 No |
Post New Answer View All Answers
Can we override private method in java?
Why are the methods of the math class static?
Can size_t be negative?
What is passing parameters in java?
What is thread safe java?
5 Coding best practices you learned in java?
What is the purpose of a volatile variable?
Name few java.lang classes introduced with java 8 ?
Explain about varargs in java?
Explain about abstract classes in java?
What is the difference between a method and a function in alice?
How many types of operators are there?
What is class and object in java?
What's the difference between comparison done by equals method and == operator?
Explain working of call by reference function invoking.