I was wondering about the implementation of length
of a Java Array. I know that using arrayName.length
gives us the number of elements in the array, but was wondering if this is a method / function or it is just a data member of Array?
I guess it must be a data member as we do not use parenthesis()
when invoking it. But if it is a data member how/when is the value of this length
assigned/computed?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…