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);
}
}
duffymo
2009-01-21 01:26:32
"You should be able to find this in a tutorial" so subtle :)
JTA
2009-01-21 01:32:02
+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
2009-01-21 01:26:48