Sure, what do you want to know about methods? What are you having problems with?
A method is a function. You use methods wherever you will need to call the same set of code multiple times. Here is a C++ method
Code:
void HelloWorld()
{
cout << "Hello World";
}
So, from inside of my code wherever I want to display "Hello World" I simple just call my function
Here is a java example:
Code:
import java.awt.*;
import java.applet.*;
public class calculation extends Applet
{ int first, answer;
public void paint (Graphics g)
{
first = 34;
calculation();
g.drawString("Twice 34 is " + answer, 10, 25);
}
public void calculation ()
{
answer = first * 2;
}
}
More info:
http://richardbowles.tripod.com/java...ds/methods.htm