Java Array Sum ArraySum(float[] a)

Here you can find the source of ArraySum(float[] a)

Description

Array Sum

License

Open Source License

Declaration

public static float ArraySum(float[] a) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static float ArraySum(float[] a) {
        float sum = 0.0f;
        for (float aa : a) {
            sum += aa;/*from  www.j  a v  a  2s  .com*/
        }
        return sum;
    }

    public static long ArraySum(long[] a) {
        long sum = 0;
        for (long aa : a) {
            sum += aa;
        }
        return sum;
    }

    public static int ArraySum(int[] a) {
        int sum = 0;
        for (int aa : a) {
            sum += aa;
        }
        return sum;
    }
}

Related

  1. arrayAdd(int[] sumFreq, int[] freq)
  2. ArrayCeilSum(float[] a)
  3. arraySum(double[] a)
  4. arraySum(double[] arr)
  5. arraySum(final double input[])
  6. arraySum(int[] intArray, short flag)
  7. getSum(int[] array)
  8. getSum(int[] array)
  9. sum( int[] a)