Yes, you can use the $
specifier for this. The number preceding the $
indicates the argument number, starting from 1:
String.format("%1$s FOO %1$s %1$s", "test")
Yes, you can use the $
specifier for this. The number preceding the $
indicates the argument number, starting from 1:
String.format("%1$s FOO %1$s %1$s", "test")