String hello = "Hello";
String.format("%s %s %s %s %s %s", hello, hello, hello, hello, hello, hello);
hello hello hello hello hello hello
Does the hello
variable need to be repeated multiple times in the call to the format method or is there a shorthand version that lets you specify the argument once to be applied to all of the %s
tokens?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…