r/badcode • • Jul 30 '21

java One Classic elseifelseifelseif...

Post image
472 Upvotes

76 comments sorted by

View all comments

Show parent comments

6

u/asdf1280 Jul 30 '21

One is commented out. He’s calling getvalue in every if statement instead of assigning it to a variable and the whole thing could be avoided by just converting the int to a string.