Here you can find the source of printIntegerList(List
public static void printIntegerList(List<Integer> array)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static void printIntegerList(List<Integer> array) { System.out.print("["); int i = 0; for (Integer integer : array) { System.out.print(integer); if (i != array.size() - 1) { System.out.print(", "); } else { System.out.println("]"); }/* w ww .j a va 2 s.c o m*/ i++; } } }