Sunday, February 13, 2011

public static void main string args in java

public: This method is public because it is accessible to JVM, for execution.

static: main method is called with out creating an object for the class

void: main method doesn't return any value so we have to use void

String args: when user try to give input parameters from command prompt these arguments are handled by String args(Array)

No comments:

Post a Comment