dhust
8/3/2013 - 1:09 AM

An example of a basic method

An example of a basic method

public static void main(String[] args) {

  // Three "calls" to the method 'printStuff'
  printStuff();
  printStuff();
  printStuff();
}

// This code only runs if it's "called"
public static void printStuff () {
  System.out.println("Hello earth");
}