Multiple choice technology web technology

What if I write static public void instead of public static void in main method?

  1. Runtime Error

  2. Compilation Error

  3. Program compiles and runs properly.

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Java allows any order for method modifiers. 'static public void' and 'public static void' are identical to the compiler. The main method requires public, static, void return type, String[] args, but modifier order is flexible.