r/badcode • • Jun 23 '20

java 'val' is a boolean value.

Post image
1.0k Upvotes

58 comments sorted by

View all comments

13

u/Nick433333 Jun 23 '20

Nothing wrong as long as you remember that it’s boolean, it would be a lot easier to judge how bad this is if the rest of the code was there

4

u/MathSciElec Jun 23 '20

Nothing wrong? There’s an unnecessary comparison, and I doubt the function itself is even necessary...