Here you can find the source of convertArrayToString(Object[] ig, int count)
public static String convertArrayToString(Object[] ig, int count)
//package com.java2s; //License from project: Apache License public class Main { public static String convertArrayToString(Object[] ig, int count) { if (ig != null && ig.length > 0) { StringBuilder str = new StringBuilder(""); for (int i = 0; i < ig.length && i < count; i++) { str.append(String.valueOf(ig[i])).append(","); }//from w w w . j av a 2s .co m return str.substring(0, str.length() - 1); } return ""; } }