java快速重复字符串
JDK
String str = "abc";
String repeated = str.repeat(3);
repeated.equals("abcabcabc");
Guava
List<String> l1 = Lists.newArrayList(anotherListOrCollection);
List<String> l2 = Lists.newArrayList(aStringArray);
List<String> l3 = Lists.newArrayList("or", "string", "elements");
Loading...