Java Array Print printArray(T[] arr)

Here you can find the source of printArray(T[] arr)

Description

print Array

License

Apache License

Declaration

public static <T> void printArray(T[] arr) 

Method Source Code

//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();
    }
}

Related

  1. printArray(Object[] strArray, String split)
  2. printArray(String arrayLabel, Object[] array)
  3. printArray(String[] arr, char separator)
  4. printArray(String[] s)
  5. printArray(String[] s)
  6. printArray(T[] array)
  7. printArray(T[] array)
  8. printArrayElements(T[] array)
  9. printArrayFrom(int[] array, int start)