I am wondering how to phrase the following: my ArrayBlockingQueue list has space for ten entries (0-9); my question is, how would I write or phrase this?
Am I correct in saying, “ArrayBlockingQueue has ten indices”, or “ArrayBlockingQueue has nine indices”?
I would imagine that the answer is “ten” but I just want to make sure.
Thank you.
One does not normally speak of the indices as being a part of the array (after all, the indices don’t physically exist), so I would say “ArrayBlockingQueue has ten elements“. The number of elements is independent of the starting index, so it would be ten whether you start counting at 0, 1, or 42. If you want to specify that the indices start at 0, you’d say “ArrayBlockingQueue is a 0-based (or 0-indexed) array with ten elements”.