what if I write ( static public void ) instead of ( public static void ) ?
Raj
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[])
no problem
No problem
no difference
No difference
It does not matter. It will work.
Nothing will happen !
It was nothing the program compiles and runs properly.