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
What is an argument in java?
What is Java Shutdown Hook?
What is the formula to calculate percentage?
Can we override constructors?
Why java is called not pure object oriented language?
How do you implement tree mirroring in java?
Can a constructor call another constructor?
Is c better than java?
What are the major advantages of internal iteration over external iteration?
How many classes can any class inherit java?
What is an abstract class and what is it’s purpose?
How to check if linked list contains loop in java?
What are the important features of Java 9 release?
What is oop principle in java?
What happens if I remove static from main method?