Here you can find the source of array2String(String[] array)
public static String array2String(String[] array)
//package com.java2s; /*/* w w w. j av a2 s . com*/ * Copyright (c) 2014. Lorem ipsum dolor sit amet, consectetur adipiscing elit. * http://www.apache.org/licenses/LICENSE-2.0 */ public class Main { private final static String SPLIT_SYMBOL = "|"; public static String array2String(String[] array) { if (array == null || array.length <= 0) return null; StringBuilder builder = new StringBuilder(); for (int i = 0; i < array.length - 1; i++) { builder.append(array[i]); builder.append(SPLIT_SYMBOL); } builder.append(array[array.length - 1]); return builder.toString(); } }