Here you can find the source of arraySum(final double input[])
Parameter | Description |
---|---|
input | The input array |
public static double arraySum(final double input[])
//package com.java2s; //License from project: Open Source License public class Main { /**// w w w .j a va 2 s . co m * Calculates the sum of all array elements * * @param input The input array * @return The sum */ public static double arraySum(final double input[]) { double sum = 0; for (double v : input) sum = sum + v; return sum; } }