That's a full, executable program that I just wrote off the cuff in 30 seconds while looking at your blog code. I think it has both Java versions beat for striking the right balance of concision and clarity.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Even the version in 2019 Java looks pretty convoluted to me. Now it's looking like Scala, which I'm also not a fan of.
Check out the version of this code in Go:
That's a full, executable program that I just wrote off the cuff in 30 seconds while looking at your blog code. I think it has both Java versions beat for striking the right balance of concision and clarity.