Oracle Official Code Standard:
*Modifiers
class ExampleClass {
// Access modifiers first (don't do for instance "static public")
public static void main(String[] args) {
System.out.println("Hello World");
}
}
interface ExampleInterface {
// Avoid 'public' and 'abstract' since they are implicit
void sayHello();
}
public / private / protected)
abstract
static
final
transient
volatile
default
synchronized
native
strictfp
public nor abstract, and nested enums and interfaces should not be declared static.
final unless it improves readability or documents an actual design decision.
final unless there is a compelling reason to make them mutable.