Fuga Fuga - 9 days ago 6
Java Question

Java equivalent to Delphi's Low() and Hi() functions for multi-dimensional arrays

I need an equivalent to these functions in java, but i'm not quite sure on what they do.
In my understanding of the definition, the

low()
would be
0
and the
high()
would be
.length - 1
. Is this correct?

MBo MBo
Answer

Java arrays are always zero-based, so yes, you are right.

(Delphi (static) array might have arbitrary starting index of any ordinal type, that is why Low is useful here)

Comments