Re: Help -- New to Java
- From: Lew <lew@xxxxxxxxxxxxxxxx>
- Date: Thu, 26 Jul 2007 09:54:46 -0400
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
.
- Follow-Ups:
- Re: Help -- New to Java
- From: John
- Re: Help -- New to Java
- From: Bjorn Abelli
- Re: Help -- New to Java
- References:
- Help -- New to Java
- From: Al
- Re: Help -- New to Java
- From: Bjorn Abelli
- Help -- New to Java
- Prev by Date: Re: @override?
- Next by Date: Re: Help -- New to Java
- Previous by thread: Re: Help -- New to Java
- Next by thread: Re: Help -- New to Java
- Index(es):