Java tutorial
//package com.java2s; import java.util.List; public class Main { public static Double listSum(List<Double> list) { if (list == null || list.isEmpty()) { return null; } Double sum = 0.0; for (Double value : list) { sum += value; } return sum; } }