Re: Help -- New to Java



Bjorn Abelli wrote:
public static int double(int[] p) {

You'll need a method name that isn't a keyword.


// Here you put in the logic to calculate the average

}

The main difference from C in this aspect is that you need to use the keyword "static". Otherwise it becomes an "instance member" instead of a "class member".

No, you don't. This could just as well be an instance method.

--
Lew
.