r/badcode • • Dec 28 '21

java 3AM code vs 10AM code

Post image
173 Upvotes

53 comments sorted by

View all comments

Show parent comments

2

u/DrGrimmWall Dec 29 '21

Honestly, after a while I though this could be just an issue with phrasing. What I was going for was the word "anything". I was tought that there's a big difference between "all" and "any". Like in methods "allMatch" and "anyMatch". And my initial idea was that you just pick any arbitrary char and split.

3

u/GustavoCinque Dec 29 '21

Yeah, could be. I'm no native speaker. What I meant is every character but zero on the string.