Java Array Print println(int[] array)

Here you can find the source of println(int[] array)

Description

println

License

Open Source License

Declaration

public static void println(int[] array) 

Method Source Code


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

import java.util.List;

public class Main {
    public static void println(int[] array) {
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i] + " ");
        }/* w  ww . j  a  v  a2s .  com*/
        System.out.println();
    }

    public static void println(List<?> list) {
        for (int i = 0; i < list.size(); i++) {
            System.out.print(list.get(i) + " ");
        }
        System.out.println();
    }

    public static void println(int[][] matrix) {
        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                System.out.print(matrix[i][j] + " ");
            }
            System.out.println();
        }
    }
}

Related

  1. printArrayToString(Object[] array)
  2. printErrInvocationString(String cls, String[] args)
  3. printfirstBytes(String comment, byte[] input)
  4. printFloatArray(float[] arr)
  5. printFloatArray(float[] array)
  6. println(Object[] objs)
  7. printMap1(String[] s)
  8. printOutArrayProperty(String key, E[] property, boolean isDefault)
  9. printParameterMap(Map parameters)