0 votes
in JAVA by
What is difference between throw and throws in java?

1 Answer

0 votes
by

What is difference between throw and throws in java?

Throw is a keyword which 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 which might get thrown by the function while executing the code.

Related questions

+3 votes
asked May 13, 2021 in JAVA by rajeshsharma
+1 vote
asked May 30, 2020 in JAVA by Robindeniel
...