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:

aload_1
arraylength

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.