Modifier Keyword order in Java

In theory it does not matter if you say public static final or final static public, but if you follow the usual convention, other people will able to read your code more easily. Here is the preferred order:

[ public | protected | private ]

static

abstract

synchronized

[ transient | volatile ]

final

native

strictfp

[ int | long | String | class | enum | interface etc. ]

Leave a Comment