Difference between throw and throws in Java? [duplicate]
问题 This question already has answers here : Exception handling : throw, throws and Throwable (8 answers) Closed 5 years ago . Can any one clearly state the difference between throw and throws in Java exception handling with an example? I have tried googling but couldn't arrive at a conclusion. Pls help 回答1: throws clause is used to declare an exception and throw keyword is used to throw an exception explicitly. If we see syntax wise then throw is followed by an instance variable and throws is