No, the throws clause cannot be used to raise an exception. The throw statement signals the occurrence of an exception during the execution of a program. When the program encounters a throw statement, the method terminates and returns the error to the calling method.
Liked By
Write Answer
Can you use the 'throws' clause to raise an exception?
Join MindStick Community
You have need login or register for voting of answers or question.
Sumit Kesarwani
27-Aug-2014No, the throws clause cannot be used to raise an exception. The throw statement signals the occurrence of an exception during the execution of a program. When the program encounters a throw statement, the method terminates and returns the error to the calling method.