Java List Print printIntegerList(List array)

Here you can find the source of printIntegerList(List array)

Description

print Integer List

License

Open Source License

Declaration

public static void printIntegerList(List<Integer> array) 

Method Source Code


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

Related

  1. printEachLine(List list)
  2. printFiredRules(List firedRules)
  3. printInclusionFailure(String relName, List list)
  4. printIndex(final Map> index)
  5. printIntegerArrayList(ArrayList arr)
  6. printItemList(String label, List itemList)
  7. printLines(List lines)
  8. printLinkedList(String prefix, LinkedList list)
  9. printList(Collection list)