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......

