what is the meaning of args[] in the main method of program in java.

Program:

// define class two in which main method will write
class Two
{
    //call main method
    public static void main(String args[])
    {
        //call print function
        System.out.println(args[0]);
        System.out.println(args[1]);
        System.out.println("hello java");
    }
}



Sample output:


Post a Comment

Previous Post Next Post