The throws statement is used after the method declaration, which means that the exception is thrown and handled by the caller of the method.
The throw statement is used in the body of the method to indicate that an exception is thrown and processed by the statement in the method body.
Throws primarily declares that this method throws an exception of this type so that its caller knows to catch the exception.
Throw is a specific action that throws an exception, so it is throwing an exception instance.
throws shows that you have that possibility, inclination.
throw, that's how you turn that tendency into reality.
Meanwhile:
1, throws appear in the method function header, and throw appears in the function body.
2, throws, indicates that there is a possibility of an exception, which does not necessarily occur, that throws an exception, and that the throw throws a certain exception.
3, both are negative ways of dealing with exceptions (the negativity here is not to say that this is not a good way), just throw or maybe throw an exception, but not by the function to handle the exception, the real handling exception is handled by the upper call of the function.
The difference between throw and throws