Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
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!

28.5k questions

29.9k answers

500 comments

99.1k users

Browse Categories

...