Here you can find the source of arrayToString(String[] arr, String expr)
public static String arrayToString(String[] arr, String expr)
//package com.java2s; //License from project: LGPL public class Main { public static String arrayToString(String[] arr, String expr) { String strInfo = ""; if (arr != null && arr.length > 0) { StringBuffer sf = new StringBuffer(); for (String str : arr) { sf.append(str);//from w w w . ja va 2 s . c o m sf.append(expr); } strInfo = sf.substring(0, sf.length() - 1); } return strInfo; } }