Intellipaat 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

0 votes
1 answer
asked Feb 20, 2020 in Java by angadmishra (6.5k points)
0 votes
1 answer
asked Feb 20, 2020 in Java by angadmishra (6.5k points)
0 votes
1 answer
asked Feb 20, 2020 in Java by angadmishra (6.5k points)
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...