Welcome! Log In Create A New Profile

Advanced

public static void main(String[] args)

Posted by Bheki 
Position: School of Computing Forums > 2006 > COS2144
AnnouncementsLast Post
AnnouncementmyUnisa access problems02/19/2014 04:04PM
AnnouncementSurvey request - marketing SMSs02/04/2014 08:00AM
AnnouncementBest wishes from the Director12/06/2013 08:04AM
Announcement3G Internet access offer for students03/13/2014 06:51PM
AnnouncementGame Development World Championship 2013.01/18/2014 11:26PM
public static void main(String[] args)
seven years ago
what is the meaning / purpose of static keyword in this method definition:
public static void main(String[] args){}
Re: public static void main(String[] args)
seven years ago
Bheki Wrote:
-------------------------------------------------------
> what is the meaning / purpose of static keyword in
> this method definition:
> public static void main(String[] args){}


public - to access from outside the class
static - to access the method ( main ) without creating an object of it
void - the method returns nothing

Read page 110 in Jia for a more generic description of the static term. Hope that helps smiling smiley

Sorry, only registered users may post in this forum.

Click here to login