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