ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <co...@cortexebusiness.com.au>
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.

Conor


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message