You have defined a function
sum()
which takes as input an integer and an array of doubles, and returns a double. However in your call you are passing two integers as input parameters; obviously this does not match. If you are having trouble understanding this then I suggest you go to
The Java Tutorials[
^] and spend some time learning the language basics.