+ 3

Does "public static void main" must be in this order ?

Can I rearrange their position ? Exp , "static void public main" ?

3rd Sep 2016, 1:02 AM
Ziq Kimi
Ziq Kimi - avatar
3 Réponses
+ 3
If you have doubts, try to code it yourself and see what happens. To answer your question though, yes, they must follow that order.
3rd Sep 2016, 2:21 AM
James
James - avatar
+ 2
no you cant.firstly you have to write access type,then you have to write static or not(nothing write) then return type and function name.
3rd Sep 2016, 8:49 AM
bayram akdemir
bayram akdemir - avatar
+ 1
Signature format for methods is predefined You cant alter them
4th Sep 2016, 8:50 AM
Harsh