經安全檢測,此網站為安全網站,請放心前往原始網址!

How do you find the sum of all the numbers in an array in java ...

Once java-8 is out (March 2014) you'll be able to use streams: int[] a = {10,20,30, 40,50}; int sum = IntStream.of(a).sum(); System.out.println("The sum is " + sum);.

stackoverflow.com

網址安全性掃描由 google 提供