>>4/ depends on the JDK; newer compilers /may/ see a repeat string concat
>> ("+" op) and replace w/ StringBuffer under the covers...
>>
>>
>This is a common psuedo-misconception. Compilers can't do anything with strings
>that have a paramter of which the value can only be realized at runtime.
>
>public static String OPTIMIZED = "optimized";
>
>"This can be " + OPTIMIZED + " at compile time to a single string with no
>concatenation at runtime"
>
>
You seem to have missed the final keyword. Without it, no optimization
is possible.
Antonio
|