int size()
Like all Java arrays, BusObjArray is a zero relative array. This means that the size() method will return 1 greater than the getLastIndex() method.
The following example returns the number of elements in the array items.
int size = items.size();