Java tutorial
//package com.java2s; import java.util.ArrayList; public class Main { public static String getAllListValue(ArrayList<String> data) { String value = ""; if (data == null) return value; for (int i = 0; i < data.size(); i++) { value = value + data.get(i) + (i == data.size() - 1 ? "" : ","); } return value; } }