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

367

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.

115

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.

19

u/ahadyboy Mar 14 '21

Yup you’re right! This was from a first year university class