Re: Writing a method [beginner]
- From: KyoGaSuki <jrockgadaisukidayou@xxxxxxxxxxx>
- Date: Thu, 20 Mar 2008 01:23:26 -0700 (PDT)
On Mar 20, 3:35 am, Mark Vismonte <LiLrUnNiNBaL...@xxxxxxxxx> wrote:
or say you wanted something to print out
public void printThis(String z)
{
System.out.println(z);
}
On Mar 20, 12:31 am, Mark Vismonte <LiLrUnNiNBaL...@xxxxxxxxx> wrote:
those would be the parameters say if you wanted a method called addOne
public static int addOne(int firstNumber)
{
return firstNumber + 1;
}
On Mar 19, 11:02 pm, KyoGaSuki <jrockgadaisukida...@xxxxxxxxxxx>
wrote:
So we have a test tomorrow on writing methods, and I thought I
understood it...until I looked at some examples and realized....I
don't know how to actually write one.
So far I know:
public static void methodName( // Don't know what goes here and
why // ) {
statements here;
}
Can anyone help T.T?
So when it says "the method getCoord takes one string parameter, does
that mean is should be:
public static string getCoords
and then it says "prompt for and performs input of one floating point
value representing a coordinate of a point" does it mean that it would
be?:
public static string getCoords(float coord){
}
.
- Follow-Ups:
- Re: Writing a method [beginner]
- From: Abdullah
- Re: Writing a method [beginner]
- References:
- Writing a method [beginner]
- From: KyoGaSuki
- Re: Writing a method [beginner]
- From: Mark Vismonte
- Re: Writing a method [beginner]
- From: Mark Vismonte
- Writing a method [beginner]
- Prev by Date: Re: Detecting multiple class loaders
- Next by Date: Re: Socket error Windows getInputStream
- Previous by thread: Re: Writing a method [beginner]
- Next by thread: Re: Writing a method [beginner]
- Index(es):
Relevant Pages
|