Anyone will really use the single Object argument version? There's nothing to join here.

- Max

------- Original message -------
From: Joe Darcy <joe.da...@sun.com>
Cc: core-libs-dev@openjdk.java.net
Sent: 23.10.'09,  9:49

Joe Darcy wrote:
   public static String join(String separator, Iterable<?> objects);
   public static String join(String separator, Object[] objects);
public static String join(String separator, Object first, Object... rest);

with analogous methods in StringBuffer and StringBuilder return that type, respectively, instead of String?

I assume the motivation for having both the Object[] and (Object, Object...) versions is to avoid unnecessary array creation in the case of one argument since the single method join(String, Object...) could also be used.

-Joe

Reply via email to