+ 1
What is the difference between throws,throw and Throwable?
2 Answers
0
Throwable is the parent class of both Error and Exception classes. throw is a statement which is defined in Throwable, as Exceptions are not "called" but "thrown". When you know about (possible) scenarios which may cause an exception while using your method, you can write some handling for it, then you use throws.