sid's

OPen Discussion
 
HomePortalCalendarFAQSearchRegisterMemberlistLog in

Share | 
 

 METHOD

View previous topic View next topic Go down 
AuthorMessage
Admin
Admin


Posts : 50
Join date : 2007-08-10
Age : 38
Location : Kuala Lumpur

PostSubject: METHOD   Mon Oct 01, 2007 9:13 pm

eg1 :

/**
This program defines and calls a simple method.
*/

public class SimpleMethod
{
public static void main(String[] args)
{
System.out.println("Hello from the main method.");
displayMessage();//invoked method
System.out.println("Back in the main method.");
}

/**
The displayMessage method displays a greeting.
*/

public static void displayMessage()
{
System.out.println("Hello from the displayMessage method.");
}
}
Back to top Go down
View user profile http://sidnazuha.forumotion.com
 
METHOD
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
sid's :: TEACHING MATERIAL :: UPM-SAK3100-
Jump to: