No. The Throws clause is not meant for raising an exception
The throw statement signals the occurrence of an exception during the execution of a program.
If the program finds a throw statement the method would terminate and returns the error to the calling method.
Asked In: Many Interviews |