Java ArrayList to CSV ToCSV(ArrayList vals)

Here you can find the source of ToCSV(ArrayList vals)

Description

To CSV

License

Open Source License

Declaration

public static String ToCSV(ArrayList<Integer> vals) 

Method Source Code

//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;
    }
}

Related

  1. toCsv(ArrayList columnVectors)
  2. toCsvRow(ArrayList csvRow)