next up previous contents
Next: Making new collections Up: Collections Previous: Testing Methods   Contents

Properties

size
answers the number of elements in it. This is often calculated dynamically for extensible collections, so it's often useful to cache it in a calling method.
capacity
answers the size that the collection's implementation is currently ready for.



Brian Rice 2004-08-24