Java tutorial
//package com.java2s; import java.util.ArrayList; public class Main { public static String getArrayListInString(ArrayList<Integer> array) { String numbers = ""; for (int i = 0; i < array.size(); i++) { numbers = numbers + array.get(i); if (i != array.size() - 1) { numbers = numbers + ", "; } } return numbers; } }