The dynamic compiler can perform some constant folding optimizations easily, when you declare constants as static final variables.