correction: You don't have a 2d array.
Java has no such construct.
What you have is a 1d array that holds...arrays. and technically, what you have is a 1d array that holds references, and those references point to arrays.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors