How is obtaining the size of a Java array object O(1)?
<p>I am just beginning to learn Java and heard that getting the size of an array is O(1). Why is it not O(n)?</p>

<p>Mustn't the java virtual machine count the number of items in the array?</p>
