+ 3

What if I write 'static public void' instead of 'public static void'?

5th Sep 2018, 11:23 AM
Mukund Kumar
Mukund Kumar - avatar
4 Réponses
+ 1
https://code.sololearn.com/c7ncS6XoFaaW/?ref=app Run above java program.You will get your answer..
5th Sep 2018, 12:00 PM
Mukund Kumar
Mukund Kumar - avatar
+ 1
you can change the order of "Access Modifier". you will never get any exception and the program execution will be Normal.
22nd Jan 2020, 5:56 PM
P∆WAN M∆URY∆
P∆WAN M∆URY∆ - avatar
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.
5th Sep 2018, 11:42 AM
Alpha Rays
Alpha Rays - avatar