Here you can find the source of array2String(String[] p, String spliter)
public static String array2String(String[] p, String spliter)
//package com.java2s; /*/*from w w w . ja v a 2s .com*/ * Copyright 2005-2020 GreenTube Team All rights reserved. * Support: Huxg * License: CND team license */ public class Main { public static String array2String(String[] p, String spliter) { if (p == null) return null; StringBuffer sb = new StringBuffer(); for (int i = 0; i < p.length; i++) { if (i == 0) sb.append(p[i]); else sb.append(spliter).append(p[i]); } return sb.toString(); } }