throw is used to explicitly raise an exception. throws is used in a method signature to declare that the method may throw a checked exception, delegating responsibility for handling it to the caller.
throw — Explicitly Raising an Exception
throw is used to explicitly raise an exception. throws is used in a method signature to declare that the method may throw a checked exception, delegating responsibility for handling it to the caller.