Tag: dimensions

  • Getting the number of dimensions of a multidimensional array in Java

    Based on my about cloning multidimensional arrays, I have come up with a short static function to get the number of dimensions which a multidimensional array has. Note that this method only returns the number of dimensions of the original object passed as argument. It does not expand into the contained objects themselves. Example: prints […]