Explain the difference between throw and throws in Java?

  Throw Throws
1. Used to throw an exception. Used to declare an exception
2. Followed by Exception class instance Followed by exception class names
3. Used in the method body Used in method signature

Suggest An Answer

No suggestions avaliable!

Latest post from Java interview questions

Ask Question