What happen when we write static public void instead of public static void?

Ads
Ads

What happen when we write static public void instead of public static void?


Java Coder
What happen when we write static public void instead of public static void?
2 Answer(s)      5 years and 3 months ago
Posted in : Java Beginners
Ads

Hi,

What happen when we write static public void instead of public static void?

Thanks

View Answers

April 9, 2013 at 2:42 PM


Hi,

The program will compile first then run properly. For more details visit the reference site: http://www.roseindia.net/java/gettingstartedwithjava/public-static-void-main.shtml



April 10, 2013 at 2:56 PM


Hi , There is no order to declare the modifiers. Hence there is no differnet to declare the method by public static void or static public void.


Ads