Java Array Print printArray(boolean[] array)

Here you can find the source of printArray(boolean[] array)

Description

print Array

License

Open Source License

Declaration

public static String printArray(boolean[] array) 

Method Source Code

//package com.java2s;

public class Main {
    public static String printArray(boolean[] array) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < array.length; i++) {
            if (i > 0) {
                sb.append(" ");
            }// w  w  w. j a v a  2  s. com
            sb.append(array[i] ? "1" : "0");
        }
        return sb.reverse().toString();
    }
}

Related

  1. prettyPrint(double[][] gammas, double[][] thetas, double[][] zprobs)
  2. print(Object[] array)
  3. print(Object[] array)
  4. print(String[] files)
  5. print1DIntArray(int[] array)
  6. printArray(double[] _a)
  7. printArray(double[] _a)
  8. printArray(double[] a)
  9. printArray(double[] a)