If this isn't the right place to ask about JVM, then please direct me to the correct place, thank you. :)

Anyways, I was wondering about the arraylength command. Would I be able to use that in order to find the length of rows and columns in a predefined matrix?

The book uses:


Therefore, does it only work if I define the matrix first (defeating the purpose of being able to calculate different predefined matrix in the first place)?

Any help would be greatly appreciated.

The JVM? (I know what it is and does, but why are you mentioning it?)

And arrays always have to be defined in advance, so hypothetically, if you wanted to keep an instance variable for its length, no, you would not need to call array.length ever again.