8
Reply

what if I write ( static public void ) instead of ( public static void ) ?

Raj

Raj

Sep 19, 2016
1.3k
1

    Obviously it will execute correctly but public static is the standard way, if you are going for interview then you must have to be clear that what are these PUBLIC STATIC VOID and what the use of these? public : it is a access specifier that means it will be accessed by publically. static : it is also access modifier that means is that you can access this method without having an instance of the class. void : it is a return type i.e it does not return any value. main : it is a main methodJava only starts running a program with the specific public static void main(String args[])

    Saurabh Srivastava
    July 19, 2017
    1

    no problem

    Karthikmani S
    May 29, 2017
    1

    No problem

    Mukesh Kumar
    October 14, 2017
    0

    no difference

    Mukesh Kumar
    September 03, 2017
    0

    No difference

    Mukesh Kumar
    September 02, 2017
    0

    It does not matter. It will work.

    Bhavya Dalwadi
    August 13, 2017
    0

    Nothing will happen !

    Kunal B
    May 03, 2017
    0

    It was nothing the program compiles and runs properly.

    Raj
    September 19, 2016
    0