What is the difference between throw and throws?
Answer Posted / balaji
throw:it is used to raise exception explicitly
that means it is use when a user defined exception is raised
throws:if a method is capable of throwing an exception but
it does not handle the exception that must be specified by
using "throws" class
Is This Answer Correct ? | 23 Yes | 1 No |
Post New Answer View All Answers
What is the role of garbage collector in java?
What is a private class in java?
Why heap memory is called heap?
What is an array length?
Describe different states of a thread.
Explain how to convert any java object into byte array.
What is the private method modifier?
Are arrays classes in java?
How can a gui component handle its own events?
What is the impact of declaring a method as final?
How do you sort in descending order in java using collections sort?
What is string in java is it a data type?
What is collection api?
How do you access command-line arguments within the code?
How large is a boolean?