Question #20026

How do you retrieve the number of elements in an array a?

Expert's answer

int counter = 0;
for (int i = 0; i < theArray.length; i ++){
if (theArray[i] != null)
& counter ++;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS