June 2012
Intermediate to advanced
288 pages
6h 48m
English
Main Method
The Main method is the entry point of every Java program. It is a static method and accepts parameters that can be passed to it from the command line. Here is the standard declaration for the Main method:
public static void main(String[] args)
Command line arguments are passed as an array of strings. Thus, to access the first command line argument, you would use code like this:
String parm1 = args[0];
Read now
Unlock full access