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];

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset