+ 3
What if I write 'static public void' instead of 'public static void'?
4 odpowiedzi
+ 1
https://code.sololearn.com/c7ncS6XoFaaW/?ref=app
Run above java program.You will get your answer..
+ 1
Yes, it will compile and run without any error.
https://www.quora.com/What-if-I-write-static-public-void-instead-of-public-static-void-in-Java-Will-that-make-any-difference
+ 1
you can change the order of "Access Modifier". you will never get any exception and the program execution will be Normal.
0
Something new !
Well, every programming languages have their own syntax and semantics so you can't interchanged their positions because during compilation, a program undergoes many stages such as lexical analysis,semantic analysis, syntactic analysis...
Changing their positions means you violating rules.