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
What is the technique adopted to create an immutable class?
What are the differences between getting and load method?
Give few examples of final classes defined in Java API?
What is maximum size of arraylist in java?
How does linkedlist work in java?
How to create an immutable class?
How does arraylist work in java?
What is the difference between preemptive scheduling and time slicing?
What is an abstract class and what is it’s purpose?
Is there any difference between nested classes and inner classes?
Why is it called boolean?
what is mutual exclusion? How can you take care of mutual exclusion using java threads? : Java thread
Explain the inheritance?
What is private static class in java?
What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement?