L
Lew
Roedy said:nd as someone else mentioned, the new method would change
the behavior of today's StringBuilder:
StringBuilder buff = new StringBuilder();
buff.append( new String[] { "Hello, ", "world!" } );
System.out.println(buff);I don't follow. The API has an extra method, but I can't see how the
result would be any different from traditional StringBuilder or
StringBuffer.
With today's StringBuilder, the output on my system is
[Ljava.lang.String;@3e25a5
With an append(String...) method -- really an append(String[])
method -- I would presumably get the output
Hello, world!
... an incompatible quiet change. (For the better, I agree,
but incompatible nonetheless and hence not to be undertaken
rashly. I don't know of any code that relies on the current
behavior, other than the toy fragment I posted, but I would
not bet that no such code exists.)
This was mentioned upthread on 29 September.