Amount of time to access an element of an m-by-n array in Java