so do I only need 1 input variable now (double d) for d because d is adding them in the sum method?
Look at the method. It is not just double d, but double...d, with three dots. This means you can put any amount of variables in there, even an array. Try it yourself.
Now you can use as many variables you want to sum up, and the same way is used to call the sum method in the average method.