3 Answers

0 votes

It includes:

  1. Throw is used to trigger an exception where as throws is used in declaration of exception
  2. Without throws, Checked exception cannot be handled where as checked exception can be propagated with throws
answered Jun 30, 2016 by Nani
0 votes

1. Throws clause in used to declare an exception and thow keyword is used to throw an exception explicitly.

2. If we see syntax wise than throw is followed by an instance variable and throws is followed by exception class names.

3. The keyword throw is used inside method body to invoke an exception and throws clause is used in method declaration (signature).

answered Dec 10, 2016 by muneshs16
0 votes
  1. throws clause is used to declare an exception and throw keyword is used to throw an exception explicitly.

  2. If we see syntax wise then throw is followed by an instance variable and throws is followed by exception class names.

  3. The keyword throw is used inside method body to invoke an exception and throws clause is used in method declaration (signature).

answered Jun 18 by LogenRahul

Related questions