Here you can find the source of arrayToString(String[] s, String delim)
Parameter | Description |
---|---|
s | the s |
delim | the delim |
public static String arrayToString(String[] s, String delim)
//package com.java2s; //License from project: Apache License public class Main { /**//from w ww .j a va2 s. com * Array to string. * * @param s * the s * @param delim * the delim * @return the string */ public static String arrayToString(String[] s, String delim) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < s.length; i++) { buf.append(s[i]).append(delim); } return buf.toString().substring(0, buf.length() - 1); } }