Here you can find the source of ToCSV(ArrayList
public static String ToCSV(ArrayList<Integer> vals)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; public class Main { public static String ToCSV(ArrayList<Integer> vals) { String res = ""; for (Integer i = 0; i < vals.size(); ++i) { if (i > 0) { res += ","; }/*from w ww . j a va2 s . com*/ res += vals.get(i).toString(); } return res; } }