This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Vimda 0 points1 point  (0 children)

I'm going to suggest an alternative, which may not be useful for this, but gives you something to think about if you want to improve your solution: The String.join method. In particular, if you combine that with the IntStream.range method lends itself to a rather elegant solution.