5-1 SimpleMethod

Post date: Mar 8, 2014 5:27:15 PM

//This program defines and calls a simple Method.

package simplemethod;

public class SimpleMethod

{

public static void main(String[] args)

{

System.out.println("Hello from the main method.");

displayMessage();

System.out.println("Back in the main method.");

}

//The diaplayMeaaage method display* a greeting.

public static void displayMessage()

{

System.out.println( "Hello from the displayMessage method.");

}

}