Here you can find the source of array2String(Object[] objs)
public static String array2String(Object[] objs)
//package com.java2s; //License from project: Apache License public class Main { public static String array2String(Object[] objs) { StringBuffer buffer = new StringBuffer(); if (objs != null) { for (int i = 0; i < objs.length; i++) { buffer.append(objs[i]).append(","); }/*from ww w . j a v a 2s . c o m*/ } buffer.deleteCharAt(buffer.length() - 1); return buffer.toString(); } public static String toString(Object obj) { StringBuffer buffer = new StringBuffer(); if (obj != null) { buffer.append(obj); } return buffer.toString(); } }