Here you can find the source of sumOfArray(double[] array)
public static double sumOfArray(double[] array)
//package com.java2s; //License from project: Open Source License public class Main { public static double sumOfArray(double[] array) { double sum = 0; for (double x : array) { sum += x;// w w w .ja v a 2 s. c o m } return sum; } }