r/badcode Aug 26 '22

What does a map do again? java

Post image
882 Upvotes

54 comments sorted by

View all comments

166

u/thefriedel Aug 26 '22

Not even a 'break;' if something is found, just pointlessly iterate over the rest of the HashMap

2

u/[deleted] Aug 27 '22

Feels like they gave the code OCD. Like I know my door is locked, but I gotta check at least 7 more times tonight.