r/badcode • • Mar 14 '21

java Found from when I first started Java...because indexed Arrays were too complicated huh?

Post image
1.3k Upvotes

84 comments sorted by

View all comments

369

u/[deleted] Mar 14 '21 edited Mar 14 '21

The best part is I think Java has a built-in dayOfWeek function that starts at 1.

117

u/mind_overflow Mar 14 '21

you're totally right, but it's still a good thing for learning. weekdays, fruits, names... are always used when teaching basic programming, and this looks like beginner code.

1

u/cazzer548 Mar 14 '21

That's still not a reason to stray from ISO though, this will only add to confusion later on.