Can we use the throws clause to raise the exception

Can we use the 'throws' clause to raise the exception?

E

Expert

Verified

No, we cannot use the throws clause. The throw statement indicates the happening of an exception at the time of execution of the program. When a program encounters the throw statement, the method then terminates and returns an error to a calling method.

   Related Questions in Software Engineering

©TutorsGlobe All rights reserved 2022-2023.