Browse - Programming Tips - Should you write "static final" or "final static" ?

Date: 2014sep10
Language: Java
Keywords: order, syntax, keywords

Q.  Should you write "static final" or "final static" ?

A.  Both are legal but the convention is "static final".  For example:

public static final int NUMBER = 123; private static final int NUMBER = 123;
By the way, I avoid "static" and "final" in example code here on davekb unless its necessary. But I use both in production code.