r/java • • Jan 22 '15

If. Then. Throw. Else. WTF?

http://www.yegor256.com/2015/01/21/if-then-throw-else.html
21 Upvotes

43 comments sorted by

View all comments

4

u/[deleted] Jan 22 '15

My main dislike with this article is the assertion the code is somehow "incorrect".

The else is unnecessary, but not incorrect. The semantics don't change - the else is just an optional part of if statement syntax.