v.size() not giving me the size

hi everybody,

I m not able to get the size of the vector when i use size() method.. need help on this plz.. below is my code

while (res.next())

{

for (int i = 1; i <= cno; i++)

{

String phno = res.getString(i);

vs = new Vector();

vs.addElement(phno);

int a = vs.size();

System.out.println(a);

ListIterator iter = vs.listIterator();

while (iter.hasNext())

{

System.out.println(iter.next());

}

}

}

its printing all the elements in the conolse but its giving me 'a' as 1......

[603 byte] By [devsua] at [2007-11-27 0:32:12]
# 1
size() is working perfectly. you're creating a new vector in each iteration of your loop
georgemca at 2007-7-11 22:37:31 > top of Java-index,Core,Core APIs...
# 2
you're creating a new vector every iteration of the loop. v.size is working perfectly
georgemca at 2007-7-11 22:37:31 > top of Java-index,Core,Core APIs...
# 3
georgemc ,, seconds before i read ur reply i had figured it out... But THANK YOU. very much............
devsua at 2007-7-11 22:37:31 > top of Java-index,Core,Core APIs...
# 4
> georgemc ,, seconds before i read ur reply i had> figured it out... But THANK YOU. very> much............yeh yeh yeh that's what they all say ;-)apologies for double-post, browser suddenly self-aware
georgemca at 2007-7-11 22:37:31 > top of Java-index,Core,Core APIs...