This is silly shit.

The loop is still there, it's just been pushed down into a container class. And a lot of languages in common use like C don't have the foreach keyword.

Java has some major issues, foremost of which is its idiomatic use of throw, which nobody should use except for actual exceptions.

If you've ever seen an infinite non-terminating loop then you've been working with exceptionally junior people who are not ready to get paid for their work.

Outsourcing? Thought so.

And why don't you worry a little more about your formatting? That stuff is so cluttered and jagged it's well nigh unreadable. You have multiple executions on a single line. That's unprofessional af.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store