what is difference between throw and throws in exception?
Answer Posted / ravivarman
Throw keyword can be used by a program to throw exceptions
explicitly.the execution of the current block stops
immediately after the throw statement.
A method should declare that it can cause an exception and
expects its caller handle or re-throw the exception.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
When throws keyword is used?
What are assembly attributes?
What is difference between stringbuffer and string?
Does unicode support all languages?
How do you check if a number is a perfect square?
What do you mean by byte code?
Can we have multiple catch block for a try block?
What class of exceptions are generated by the java run-time system?
What is a ternary operator in java? What is an interface?
What is an object in java and how is it created?
What is the epoch date?
What are checked exceptions?
How hashmap works in java?
Why are global variables used?
What does this () mean in constructor chaining concept?