The throw is a keyword that is used to throw an exception explicitly in the program inside a function or inside a block of code.
Throws is a keyword used in the method signature used to declare an exception that might get thrown by the function while executing the code.