public class ProcedureTypeMethod
{
public static void main (String[] args)
{
// EXAMPLE 1:
//
// % this procedure outputs the string "HAPPY HOLIDAYS!"
//
// procedure greetings
//
// put "HAPPY HOLIDAYS!"
//
// end greetings
//
// MAIN PROGRAM IN TURING:
// greetings % this procedure call outputs --> HAPPY HOLIDAYS!
greetings ();
System.out.println ("Hope you have a VERY HAPPY NEW YEAR!");
} // main method
public static void greetings ()
{
System.out.println ("HAPPY HOLIDAYS!");
} // greetings method
} // ProcedureTypeMethod class
No comments:
Post a Comment