MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / string2

Method string2

strings/UsingStringBuilder.java:20–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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());

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected