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 string pool?
What types of index data structures can you have in java?
What are the steps that are followed when two computers connect through tcp?
Difference between ‘is-a’ and ‘has-a’ relationship in java?
What are the types of exceptions?
What do you understand by private, protected and public?
How many digits is int32?
How is garbage collection controlled?
When parseint method can be used?
How do you define a method?
Can a source file contain more than one class declaration?
Why are parameters used in functions?
Do I need to import java.lang package any time? Why?
Difference between throw and throws?
Does a class inherit the constructors of its superclass in java programming?