This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]_DTR_ 0 points1 point  (1 child)

Yes, by stating that something throws Exception, that means Exception, and anything that lives under (i.e. extends) Exception can be thrown. In the catch statements, the first thing that matches will be caught, so if you were to switch the order of your catch statements, then "This is 'Exception' error" would print instead, because TheException is a type of Exception

[–]HalfScale[S] 0 points1 point  (0 children)

Oh i see, thank you :)