Here you can find the source of stringListToString(List
public static final String stringListToString(List<String> list, String delim)
//package com.java2s; /* CoreUtils.java/*from w ww.j a va 2 s . c om*/ * * Copyright (c) 1998 - 2006 BusinessTechnology, Ltd. * All rights reserved * * This program is the proprietary and confidential information * of BusinessTechnology, Ltd. and may be used and disclosed only * as authorized in a license agreement authorizing and * controlling such use and disclosure * * Millennium ERP system. * */ import java.util.Iterator; import java.util.List; public class Main { public static final String stringListToString(List<String> list, String delim) { if (list == null || delim == null) return null; StringBuilder result = new StringBuilder(); for (Iterator<String> it = list.listIterator(); it.hasNext();) result.append(it.next()).append(delim); return new String(result); } }