 |
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 |
 |