public static double sum(final List<? extends Number> list){
  double sum=0;
  for (  Number number : list) {
    sum+=number.doubleValue();
  }
  return sum;
}

public static double sum ( final List < ? extends Number > list ) { double sum = 0 ; for ( Number number : list ) { sum += number . doubleValue ( ) ; } return sum ; }
sums a list of numbers .
