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

Method main

arrays/ModifyExisting.java:10–16  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

8
9public class ModifyExisting {
10 public static void main(String[] args) {
11 double[] da = new double[7];
12 Arrays.setAll(da, new Rand.Double()::get);
13 show(da);
14 Arrays.setAll(da, n -> da[n] / 100); // [1]
15 show(da);
16 }
17}
18/* Output:
19[4.83, 2.89, 2.9, 1.97, 3.01, 0.18, 0.99]

Callers

nothing calls this directly

Calls 2

showMethod · 0.65
setAllMethod · 0.45

Tested by

no test coverage detected