Hi Avi,
Thank you for the response. but i think my question was a bit vague. I have a vector A with 5 elements. Each element of A is another vector. The first element of A, say A1, contains 2 elements - "Ann", "12-12-1956". The second element of A, say A2, also has 2 elements - "Bob","19-10-1970" and so on. When displaying i need to display each user and the corresponding date. But the display must be in alphabetical order. My code is roughly as follows:
Vector rsVect = new Vector();
Vector vect;
int i = 0;
while (count<=5)
{
vect = new Vector();
vect.add(getName());
vect.add(getDate());
rsVect.add(vect);
i++;
}
for (int i = 0; i < 5; i++)
{
Vector vTemp = (Vector) rsVect.elementAt(i);
String cTemp = (String) vTemp.elementAt(0);
System.out.print(cTemp + " "));
cTemp = (String) vTemp.elementAt(1);
System.out.println(cTemp));
}
Is there some way to get the names to be printed in an alphabetial order at this retrieving point?
Rebecca