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 { ...@@ -96,9 +96,7 @@ public class JsonParserTest {
private static String repeat(String s, int times) { private static String repeat(String s, int times) {
StringBuilder stringBuilder = new StringBuilder(s.length() * times); StringBuilder stringBuilder = new StringBuilder(s.length() * times);
for (int i = 0; i < times; i++) { stringBuilder.append(s.repeat(times));
stringBuilder.append(s);
}
return stringBuilder.toString(); return stringBuilder.toString();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment