Here you can find the source of printArray(T[] arr)
public static <T> void printArray(T[] arr)
//package com.java2s; //License from project: Apache License public class Main { public static <T> void printArray(T[] arr) { for (T t : arr) { System.out.print(t);/*w w w. jav a2 s .co m*/ } System.out.println(); } public static void printArray(int[] arr) { for (int t : arr) { System.out.print(t + " "); } System.out.println(); } public static void printArray(char[] arr) { for (int t : arr) { System.out.print(t + " "); } System.out.println(); } }