Raj
what if I write ( static public void ) instead of ( public static void ) ?
By Raj in Java on Sep 19 2016
  • Saurabh Srivastava
    Jul, 2017 19

    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[])

    • 1
  • Karthikmani S
    May, 2017 29

    no problem

    • 1
  • Mukesh Kumar
    Oct, 2017 14

    No problem

    • 0
  • Mukesh Kumar
    Sep, 2017 3

    no difference

    • 0
  • Mukesh Kumar
    Sep, 2017 2

    No difference

    • 0
  • Bhavya Dalwadi
    Aug, 2017 13

    It does not matter. It will work.

    • 0
  • Kunal B
    May, 2017 3

    Nothing will happen !

    • 0
  • Raj
    Sep, 2016 19

    It was nothing the program compiles and runs properly.

    • 0