This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hi folks I am fairly new to programming and i just want to know in a simple explanation how methods are working.Especially whe you put an object in a method. I have read some books but the explanations they give is like if you know programming. my eg. public void myMethod(MyObject){} if its the right way of trying to put it. What is going on and how is it executed. Please help me with examples.
Greg Brouelette
Ranch Hand
Joined: Jan 23, 2002
Posts: 144
posted
0
I think the problem here is that in order to give you a "simple" explaination we have to make assumptions about what you already know or understand. That makes this question more complex than you may realize. Before I give a simple example I would point you to http://www.bruceeckel.com/ to get Bruce's book "Thinking In Java". I'm having trouble getting to that site right now so I'll also point you to http://www.codeguru.com/java/tij/ You can download the entire book and it's source code for free from either site. This is an excellent book that will take you through the steps to get you where you want to be. Now, how to pass something in to and out of a method. Let's tell the story in source code.
For a good Prime, call:<br />29819592777931214269172453467810429868925511217482600306406141434158089