Java Arrays.toString(boolean[] a)
Syntax
Arrays.toString(boolean[] a) has the following syntax.
public static String toString(boolean[] a)
Example
In the following code shows how to use Arrays.toString(boolean[] a) method.
// ww w .ja va 2 s.c o m
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
// initializing boolean array
boolean[] b1 = new boolean[] { true, false };
System.out.println(Arrays.toString(b1));
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.util »
Java Tutorial »
java.util »