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