String hello = \"Hello\";
String.format(\"%s %s %s %s %s %s\", hello, hello, hello, hello, hello, hello);
hello hello hello hello hello hello
Do
From the docs:
The format specifiers for general, character, and numeric types have the following syntax:
%[argument_index$][flags][width][.precision]conversionThe optional argument_index is a decimal integer indicating the position of the argument in the argument list. The first argument is referenced by
"1$", the second by"2$", etc.
String.format("%1$s %1$s %1$s %1$s %1$s %1$s", hello);