In
Java "2D arrays" are actually arrays of arrays. The Class.getComponentType() method tells you the type of the data an array can hold; for a "2D array", this will be another array type. So something like
Of course, this also returns true for "3D", "4D", etc, arrays.