Here you can find the source of arrayToString(T[] items, String delimiter)
Parameter | Description |
---|---|
seq | a parameter |
public static <T> String arrayToString(T[] items, String delimiter)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from www . j a v a2s .c o m*/ * Pretty print an array of objects of type T * @param seq * @return delimited list */ public static <T> String arrayToString(T[] items, String delimiter) { if (null == items) { return "null"; } StringBuilder buf = new StringBuilder(); for (T cur : items) { if (buf.length() > 0) { buf.append(delimiter); } buf.append(cur.toString()); } return buf.toString(); } }