Stefano Bagnara wrote:
> Input code 2:
> String res = foo + "test" + bar + "test" + i;
> Output code 2 from jdk 1.4
> String s2 = s + "test" + s1 + "test" + i;
> Output code 2 from jdk 1.5
> String s2 = (new StringBuilder()).append(s).append("test")
> .append(s1).append("test").append(i).toString();
> I also tried using jdk1.5 using target 1.4 and the resulting class equal
> to the jdk1.4 generated class.
No surprise there. StringBuilder is new in 1.5.0.
> if we compile with jdk 1.5 it is better to use real string concatenation
> even when we have variables and not only literals.
Perhaps.
> It seems that using jdk1.4 results are comparable
How do you come to that conclusion? I don't agree.
--- Noel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]