
-----------------------------------
shadowman571
Sat Oct 06, 2007 4:24 pm

need help with returning variables
-----------------------------------
I need help returning a variable from one method to the main method of my program, plain and simple I cant find how to do it. 

Can anyone explain how i would go about doing this?

what i mean by this is 
if i were to make 

public static void main(string[] args)
{
}
public static void vars(string[]args)
{
string name ="Alan"
}

how would i send the information held in name back to main?

-----------------------------------
wtd
Sat Oct 06, 2007 7:34 pm

RE:need help with returning variables
-----------------------------------
Do you know what "void" means?

-----------------------------------
HeavenAgain
Sat Oct 06, 2007 10:46 pm

RE:need help with returning variables
-----------------------------------

class Testing
{
  public static void main(String

-----------------------------------
Euphoracle
Sat Oct 06, 2007 10:50 pm

RE:need help with returning variables
-----------------------------------
This is why I don't like the curriculum, they don't teach you any of the underlying concepts before teaching you the syntax.  Our teacher says to us, and I quote:  "You need to put public static void main( String args[] ) because you have to memorize it, without it you cannot write a program".

I mean seriously.  Problems like this arise.

-----------------------------------
wtd
Sun Oct 07, 2007 1:04 pm

RE:need help with returning variables
-----------------------------------
http://compsci.ca/v3/viewtopic.php?t=9576

-----------------------------------
shadowman571
Sun Oct 07, 2007 3:09 pm

Re: RE:need help with returning variables
-----------------------------------
This is why I don't like the curriculum, they don't teach you any of the underlying concepts before teaching you the syntax.  Our teacher says to us, and I quote:  "You need to put public static void main( String args

that is what my teacher told me as well 

and thankyou i understand now
