Given some object o, I need to find its dimensionality (eg: for int[x][y][z] the dimensionality is 3), I figured that any appropriate method would be in the class of the object.
int dimensionality = o.getClass().getName().indexOf('L');
works, but its source refers to a native method, so I'm left getting the answer from a string, rather than directly.
If anyone knows a better way of doing this it would be appreciated (although more for the sake of curiosity than necessity).
{{{},{}},{}}?arrayis just anotherarray. There's nothing here to argue about.