Again, multi-dimensioned arrays greater than 3D are hard to visualize, so let's think this one through. It's important to use specific and precise language. I suspect English is not your native language, and that's fine, you're doing great, but there's a big difference between finding the length of the 3rd dimension and the length of the 3rd array. So let's stick to using "dimension" in this case. Now we have to agree on dimension numbering.

If we were talking about a 2D array, the length of the name of the array, my2DArray.length, specifies the number of rows in my2DArray, so let's call that the 1st dimension. The number of columns in a specific row, or the 2nd dimension, is then found by my2DArray[row].length. Remember that multi-dimensioned arrays don't have to be square in Java. Each row could have a different length or different number of columns.

Following that easier-to-understand pattern, then the length of the dimensions in your 4D array are:

Code :

arrayvoorbeeld.length; // length of the first dimension or the number of rows
arrayvoorbeeld[x].length; // length of the second dimension or the number of columns in row x
arrayvoorbeeld[x][y].length; // length of the third dimension or the depth of column (x, y)
arrayvoorbeeld[x][y][z].length; // length of the 4th dimension or the time of each depth (x, y, z)
// (assuming the 4th dimension is time)

In your case, everyone of the above for x, y, z = 0 through 19 should be 20, right? You might code that up to verify.