code: public static double times(double[] nums) {
          if (nums == null || nums.length == 0)
              return 0;
          double ret = 1;
          for (int i = 0; i < nums.length; i++)
              ret *= nums[i];
          return ret;
      }
docs: This returns the product of all numbers in the given array.
  @param nums the numbers to multiply over
  @return the product of all numbers in the array, or 0
  if the length is or nums i null