No size()

I don't need to know the number of components in a vector. I looking for something like length() of arrays components but for vector
[147 byte] By [mmarchena] at [2007-9-26 11:32:42]
# 1
Vector myVector = new Vector();myVector.size();
kksenji at 2007-7-2 1:33:07 > top of Java-index,Archived Forums,Java Programming...
# 2

If i interpret correctly, you have an array stored inside your Vector, and you want to find out the length of that array? If that is so, you need to cast the object to the array type, and call the length property on it.

Eg. if your Vector contains a String array:

String[] elements = (String[])vector.get(0);

int length = elements.length;

stoopidboi at 2007-7-2 1:33:07 > top of Java-index,Archived Forums,Java Programming...