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

Method twoDArray

arrays/ComparingArrays.java:11–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9public class ComparingArrays {
10 public static final int SZ = 15;
11 static String[][] twoDArray() {
12 String[][] md = new String[5][];
13 Arrays.setAll(md, n -> new String[n]);
14 for(int i = 0; i < md.length; i++)
15 Arrays.setAll(md[i], new Rand.String()::get);
16 return md;
17 }
18 public static void main(String[] args) {
19 int[] a1 = new int[SZ], a2 = new int[SZ];
20 Arrays.setAll(a1, new Count.Integer()::get);

Callers 1

mainMethod · 0.95

Calls 1

setAllMethod · 0.45

Tested by

no test coverage detected