Skip to content
Snippets Groups Projects
Commit 1bd7b729 authored by Mamadu-lamarana Bah's avatar Mamadu-lamarana Bah :speech_balloon:
Browse files

utilisation de String.repeat(...) au lieu d'un for (Java 11 requis)

parent 4a4c0955
No related branches found
No related tags found
No related merge requests found
......@@ -96,9 +96,7 @@ public class JsonParserTest {
private static String repeat(String s, int times) {
StringBuilder stringBuilder = new StringBuilder(s.length() * times);
for (int i = 0; i < times; i++) {
stringBuilder.append(s);
}
stringBuilder.append(s.repeat(times));
return stringBuilder.toString();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment