Java Array Sum sumIntArray(int[] array)

Here you can find the source of sumIntArray(int[] array)

Description

Sums an array of integers and returns it.

License

Open Source License

Parameter

Parameter Description
array a parameter

Declaration

public static int sumIntArray(int[] array) 

Method Source Code

//package com.java2s;

public class Main {
    /**/*ww  w .  jav a2 s.  c o m*/
     * Sums an array of integers and returns it.
     * 
     * @param array
     * @return
     */
    public static int sumIntArray(int[] array) {
        int sum = 0;
        for (int i : array)
            sum += i;
        return sum;
    }
}

Related

  1. sumDoubles(Double[] ds)
  2. sumEachFigureFactor(int[] numbers)
  3. sumElems(boolean[] inputRow)
  4. sumFast(final double... values)
  5. sumIntArray(int[] a)
  6. sumInts(int... numbers)
  7. sumList(int[] paramList)
  8. sumLLL(double a[], double b[], int bBegin, int bEnd)
  9. sumLog(double[] logs)