I find myself getting confused as to the order of access and non access modifiers. For example

abstract void go()  
abstract public void go()  
public final void go()  
void final go()  

final class Test{}  
class final Test{}  
final abstract class Test{}  
abstract final Test{}  

I never know what the correct order is and sometimes I get it wrong because there are so many possible combinations. Is there a definite guide as to which should come before the other?

Is there any description of the format and order in which they are to appear in the code? I am trying to come up with a syntax guide but I am not sure if it is 100% correct. Here it is:

Methods:  
[access modifier | nonaccess modifier] return-type method-name  

Classes:  
[access modifier | nonaccess modifier] class class-name  

Interfaces:  
[access modifier | nonaccess modifier] interface interface-name       

Variables:  
[access modifier | nonaccess modifier] variable-type variale-name  
Edit
Report