Here you can find the source of splitListWithComma(List StringList)
public static String splitListWithComma(List StringList)
//package com.java2s; /**//w w w.j a v a 2 s. co m * Program : CommonsFiend.java * Author : niehai * Create : 2008-5-14 ????05:05:54 * * Copyright 2007 by Embedded Internet Solutions Inc., * All rights reserved. * * This software is the confidential and proprietary information * of Embedded Internet Solutions Inc.("Confidential Information"). * You shall not disclose such Confidential Information and shall * use it only in accordance with the terms of the license agreement * you entered into with Embedded Internet Solutions Inc. * */ import java.util.List; public class Main { public static String splitListWithComma(List StringList) { StringBuffer strOfList = new StringBuffer(""); for (int i = 0; i < StringList.size(); i++) { if (i != 0) { strOfList.append(","); } strOfList.append(StringList.get(i).toString()); } return strOfList.toString(); } }