What is this [Z?

Braille ZIn a dump from a Java Virtual Machine, just before an out of memory, there was a list of numbers of instances of objects in the JVM. So there was a table with a ‘number of instances’ column and a ‘type’ column.

One of the types was [I, so probably arrays of integers, but what are the [Z's?

Here is a little program to find out:

public class DumpClassType {

    public static void main(String[] args) {
        System.out.println(“String[0][0][0]: ” + new String[0][0][0].toString());
        System.out.println(“short[0]       : ” + new short[0].toString());
        System.out.println(“double[0]      : ” + new double[0].toString());
        System.out.println(“long[0]        : ” + new long[0].toString());
        System.out.println(“char[0]        : ” + new char[0].toString());
        System.out.println(“int[0]         : ” + new int[0].toString());
        System.out.println(“boolean[0]     : ” + new boolean[0].toString());
        System.out.println(“byte[0]        : ” + new byte[0].toString());
        System.out.println(“float[0]       : ” + new float[0].toString());
    }

}

And the output:

String[0][0][0]: [[[Ljava.lang.String;@3b2a3b2a
short[0]       : [S@3c183c18
double[0]      : [D@3c8c3c8c
long[0]        : [J@3d003d00
char[0]        : [C@3d743d74
int[0]         : [I@3de83de8
boolean[0]     : [Z@3e5c3e5c
byte[0]        : [B@3f443f44
float[0]       : [F@3faa3faa

So, obviously, an array of booleans!