5-1 SimpleMethod

posted Mar 8, 2014, 9:27 AM by Dlovan ismail   [ updated Mar 8, 2014, 9:27 AM by Karwan Jacksi ]
//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.");
        }
    
}

ċ
SimpleMethod.java
(1k)
Karwan Jacksi,
Mar 8, 2014, 9:27 AM
Comments