Is there a way in java to create a string with a specified number of a specified character? In my case, I would need to create a string with 10 spaces. My current code is:
I think this is the less code it's possible, it uses Guava Joiner class:
Joiner.on("").join(Collections.nCopies(10, " "));