Here you can find the source of sum(double[] dbs)
public static double sum(double[] dbs)
//package com.java2s; //License from project: Apache License public class Main { public static double sum(double[] dbs) { double value = 0; for (double d : dbs) { value += d;//from ww w . j a v a 2 s.co m } return value; } public static int sum(int[] dbs) { int value = 0; for (int d : dbs) { value += d; } return value; } public static double sum(double[][] w) { // TODO Auto-generated method stub double value = 0; for (double[] dbs : w) { value += sum(dbs); } return value; } }