Here you can find the source of arraySum(double[] arr)
public static double arraySum(double[] arr)
//package com.java2s; //License from project: Apache License public class Main { public static double arraySum(double[] arr) { double sum = 0; for (double num : arr) { sum += num;/*from ww w. j a va2 s . c o m*/ } return sum; } public static float arraySum(float[] arr) { float sum = 0; for (float num : arr) { sum += num; } return sum; } }