 <p>There is a very minor difference (effectively negligible, we're talking micro-optimization here), since the string should be stored in a local variable which takes that extra bit of memory on the stack frame of the corresponding method. Whereas the constants are actually stored in the constant pool and shared. With the likely optimizations of the JVM based on the number of invocations, it won't make a difference.</p> <p>Note that the bytecode would be the same if the variables were <code>final</code> or effectively <code>final</code> (assigned only once), since in this case they are treated as constants.</p>