Explore Courses Blog Tutorials Interview Questions
0 votes
in Java by (6.5k points)
What is the difference between the three?

1 Answer

0 votes
by (119k points)

The basic difference between throw, throws, and throwable is:

  • Throw: statement to throw object t where t instance of java.lang.Throwable must be true.
  • Throws: a method signature token that is used to specify checked exceptions thrown by that method.
  • java.lang.Throwable: This is the superclass parent type of all objects that can be thrown (and caught).

To learn more about throw, throws, and throwable then check out this Java Certification Course by Intellipaat.

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.5k questions

32.6k answers


108k users

Browse Categories