Home > DeveloperSection > Interviews > Can we write static public void instead of public static void?

Posted on    July-20-2015 7:13 AM

 Java Java 
 1 Answer(s)
  397  View(s)
Rate this:

Mayank Tripathi
Mayank Tripathi

Total Post:807

Posted on    July-20-2015 7:13 AM

Yes,  we can write,the change in sequence of modifiers are perfectly valid here. The code  will successfully complied and  runs properly. Placement of modifiers doesn't matter until the signature contains required keywords. 
We can even add final keyword in this, will work and runs fine.

Don't want to miss updates? Please click the below button!

Follow MindStick