When throws keyword is used?
Who knows best answer for that question?
there is no "best answer" there's just the answer.
the throws keyword is used in the signature of a/the method, to indicate that it might throw a certain type of Exception, forcing all the methods that call this method, to either implement some exception handling, or to throw the exception themselves.
here are some links for you to take a look at:
Any method capable of causing exceptions must list all the exceptions possible during its execution, so that anyone calling that method gets a prior knowledge about which exceptions to handle. A method can do so by using the <b>throws</b> keyword