ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <>
Subject Re: [OT] Java vector question
Date Wed, 06 Mar 2002 01:59:52 GMT
Diane Holt wrote:

> (Sorry to bug the list, but you're the only Java people I know :)
> If I have a Vector v, and I stuff some elements into it (I know they get
> in there, because I can print them out with v.firstElement() and
> v.lastElement()), shouldn't I be able to get the total number of elements
> from v.elementCount?

Only if you are extending Vector because this field is protected (which is a bad idea anyway).

Use the size() method instead.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message