Java Throw vs Throws
The Throw Keyword:
The throw keyword is used to throw an exception explicitly by the programmer
In a similar manner, we can throw user defined exceptions:
The throw Keyword
Throws java throws keyword is used to declare an exception.
This gives an information to the programmer that there might be an exception so its better to be prepared with a try catch block!