What is happening if keywords change in main method of program in java.

Program:

// define a class three, in which change the place of static, public in main method
class Three
{
    static public void main(String args[])//change
    {
        //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