Java Array Output printArray(int[] arr)

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

Description

print Array

License

Open Source License

Declaration

public static void printArray(int[] arr) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static void printArray(int[] arr) {
        printArray(arr, "\t");
    }//w  w  w  .  j a v a  2  s  .  c  o m

    public static void printArray(int[] arr, String sep) {
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + sep);
        }
        System.out.println();
    }

    public static void printArray(long[] arr, String sep) {
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + sep);
        }
        System.out.println();
    }

    public static void printArray(String[] arr, String sep) {
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + sep);
        }
        System.out.println();
    }

    public static void printArray(String[] arr) {
        printArray(arr, "  ");
    }
}

Related

  1. printArray(double[][] in)
  2. printarray(final int[] a)
  3. printArray(final Object[] array, int indent)
  4. printArray(float[] arr)
  5. printArray(int arr[])
  6. printArray(int[] array)
  7. printArray(int[][] array, String arrayLabel, String rowLabel, String columnLabel)
  8. printArray(int[][] num)
  9. printArray(Object array)