tags:

views:

128

answers:

2

Hello programmers! I know this site is for advanced programmers only but I hope that it is also for newbies :) It really hard for me how to use methods in creating a java program, can you please help me? I hope that your answers and explaination will greatly help me.

+3  A: 

Sorry, it's hard to understand what you want.

Do you want to create a method in a Java class?

public class Foo
{
    public static void main(String [] args)
    {
        Foo foo = new Foo();

        foo.aMethod("You should be able to find this in a tutorial");
    }

    public void aMethod(String message)
    {
         System.out.println(message);
    }
}

You might want to read this and this.

duffymo
"You should be able to find this in a tutorial" so subtle :)
JTA
+1  A: 

First off, I hope StackOverflow isn't just for advanced programmers, 'cause I'm definitely still a noob.

And secondly, I'm not sure what kind of response you'd like until you elaborate more in your question. But, in the meantime, here's something that might help. A quick tutorial on methods in Java.

kchau