Welcome to JavaRanch
As you remember, a method heading has several parts (you can find full details in the
Java Language Specification but it's not easy to read):
Access modifier (optional): private, public or protected.Other modifiers (optional), eg static final, synchronized.Generic formal type parameter (optional) eg <T>, and I think that comes here rather than later.return type (compulsory). If the method returns nothing, write void instead of the return type.method identifier (compulsory)(List of parameters, separated by commas. A zero-length list is permitted)In the example you quoted, the method declares a return type of "double." This tells the compiler that a double value will come back when that method completes.
You should be able to write
double sum = getSum(numbers);
So the compiler goes through every method and looks whether it returns what it claims to, from every possible "path" through the method.
Your method claims to return a double, but doesn't return a double. It actually behaves as a method which doesn't return anything (see above). It also has the peculiarity that it claims to take a double[] as a parameter, but it doesn't do anything with that parameter. It calculates and prints the total of an int[]. So you have an unused parameter; that ought to be deleted.