In Java, it's taught that variables should be kept private to enable better encapsulation, but what about static constants? This:
public static final int FOO = 5;
Would be equivalent in result to this:
private static final int FOO = 5;
...
public static getFoo() { return FOO; }
But which is better practice?
The first one if the getFoo result is costant and not need to be evaluated at runtime.