Here you can find the source of join(final List> args)
private static String join(final List<?> args)
//package com.java2s; //License from project: Open Source License import java.util.Iterator; import java.util.List; public class Main { private static String join(final List<?> args) { final Iterator iterator = args.iterator(); final Object first = iterator.next(); String res;// ww w . j ava2s. co m if (!iterator.hasNext()) { res = String.valueOf(first); } else { final StringBuilder buf = new StringBuilder(256); if (first != null) { buf.append(first); } while (iterator.hasNext()) { final Object obj = iterator.next(); buf.append(", ").append(obj); } res = buf.toString(); } return res; } }