Here you can find the source of stringListStringWithoutBracketsCommaSeparated(List
public static String stringListStringWithoutBracketsCommaSeparated(List<String> list)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static String stringListStringWithoutBracketsCommaSeparated(List<String> list) { return stringListStringWithoutBracketsWithSpecifiedSeparator(list, ","); }//from w w w. ja v a 2 s .c om public static String stringListStringWithoutBracketsWithSpecifiedSeparator(List<String> list, String separator) { String result = ""; for (int i = 0; i < list.size() - 1; i++) { result += list.get(i) + separator; } if (list.size() > 0) { // get the generated word for the last target position result += list.get(list.size() - 1); } return result; } }