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

Method basicSum

concurrent/Summing3.java:9–15  ·  view source on GitHub ↗
(Long[] ia)

Source from the content-addressed store, hash-verified

7
8public class Summing3 {
9 static long basicSum(Long[] ia) {
10 long sum = 0;
11 int size = ia.length;
12 for(int i = 0; i < size; i++)
13 sum += ia[i];
14 return sum;
15 }
16 // Approximate largest value of SZ before
17 // running out of memory on my machine:
18 public static final int SZ = 10_000_000;

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected