Java CSV from convertListToCSVString(List list)

Here you can find the source of convertListToCSVString(List list)

Description

convert List To CSV String

License

Open Source License

Declaration

public static String convertListToCSVString(List<String> list) 

Method Source Code


//package com.java2s;
import java.util.List;

public class Main {
    public static String convertListToCSVString(List<String> list) {
        StringBuilder result = new StringBuilder();
        String comma = "";
        for (String element : list) {
            result.append(comma);//  ww  w. j av a2 s.  c o  m
            result.append(element);
            comma = ",";
        }
        return result.toString();
    }
}

Related

  1. addAllFromCSV(List list, String csv)
  2. convertListToCSVString(List itemsList)
  3. convertStringListToCSV(List inputStringList)
  4. convertStringListToCSV(List source)
  5. countMaxColumnSizeByArray(List csvs)
  6. csv2list(String csvString)