Exemplo de código:
public abstract class Foo { // Type declarations. public class FooBaz { } private class FooBar { } // Static field declarations. // Remember, fields do NOT need to be sorted. static String B; static String A; // Static initializer declarations. static { } // Static methods declarations. // Remember, methods do need to be sorted. static void aStatic() { } static void bStatic() { } // Instance field declaration. String bField; String aField; // Instance Initializer declarations. { } // Constructors declaration. public Foo() { } protected Foo(String s) { } Foo(int i) { } private Foo(boolean b) { } // Instance method declaration. public void b() { } public void c() { } protected void a() { } protected void d() { } protected void e() { } protected void f() { } String h() { } // The "abstract" keyword does not modify the position of the method. abstract String i(); void j() { } private void g() { } }
Esse padrão eu achei bem elegante e pretendo utilizá-lo em minhas classes a partir de agora.