Java Matrix Print printMatrixGeneric(boolean[][] matrix)

Here you can find the source of printMatrixGeneric(boolean[][] matrix)

Description

print Matrix Generic

License

Apache License

Declaration

public static void printMatrixGeneric(boolean[][] matrix) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.List;

public class Main {
    public static void printMatrixGeneric(boolean[][] matrix) {

        System.out.println("Matrix is: ");
        for (boolean[] row : matrix) {
            for (boolean t : row) {
                System.out.print(t + "\t");
            }//  www .  j  av  a2 s.c  om
            System.out.println();
        }
        System.out.println("----------------------------------------------------");

    }

    public static void println(String message) {
        System.out.println(message);
    }

    public static void println(int num) {
        System.out.println(num);
    }

    public static void println() {
        System.out.println();
    }

    public static void print(String message) {
        System.out.print(message);
    }

    public static void print(int num) {
        System.out.print(num);
    }

    public static void print(List<String> list) {
        System.out.println("----------------------------------------------------");
        for (String str : list) {
            System.out.print(str + ", ");
        }
        System.out.println();
    }
}

Related

  1. printMatrix(int[][] target)
  2. printMatrix(Object[][] matrix)
  3. printMatrix(Object[][] matrix)
  4. printMatrix(Object[][] matrix)
  5. printMatrix(PrintStream out, double[][] matrix)