Here you can find the source of toCsv(List
public static String toCsv(List<Double> list)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static String toCsv(List<Double> list) { String csv = ""; Integer size = list.size(); for (int i = 0; i < size; i++) { csv += list.get(i).toString() + ","; }/*from w ww . j a v a 2 s .co m*/ return csv.substring(0, csv.length() - 1); } }