()
| 18 | return result.toString(); |
| 19 | } |
| 20 | public static String string2() { |
| 21 | String result = new Random(47) |
| 22 | .ints(25, 0, 100) |
| 23 | .mapToObj(Integer::toString) |
| 24 | .collect(Collectors.joining(", ")); |
| 25 | return "[" + result + "]"; |
| 26 | } |
| 27 | public static void main(String[] args) { |
| 28 | System.out.println(string1()); |
| 29 | System.out.println(string2()); |