You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public static String string1() {
Random random = new Random(47);
StringBuilder result = new StringBuilder("[");
for (int i = 0; i < 25; i++) {
result.append(random.nextInt(100));
result.append(",");
}
// This will lead to incorrect results
// [58,55,93,61,61,29,68,0,22,7,88,28,51,89,9,78,98,61,20,58,16,40,11,22,]
result.delete(result.length() - 2, result.length());
result.append("]");
return result.toString();
}
The text was updated successfully, but these errors were encountered:
public static String string1() {
Random random = new Random(47);
StringBuilder result = new StringBuilder("[");
for (int i = 0; i < 25; i++) {
result.append(random.nextInt(100));
result.append(",");
}
// This will lead to incorrect results
// [58,55,93,61,61,29,68,0,22,7,88,28,51,89,9,78,98,61,20,58,16,40,11,22,]
result.delete(result.length() - 2, result.length());
result.append("]");
return result.toString();
}
The text was updated successfully, but these errors were encountered: