Hi,
Is there any way i can retrieve keys and values in the same order that i put. I am not sure why hashtable.keys() does not give the keys back in the same order and i dont understand the order in which it returns the keys.
Consider the example program.
import java.util.Hashtable;
public class hashtest
{
public static void main(String c_strAr[])
{
Hashtable c_ht= new Hashtable();
c_ht.put("one","1");
c_ht.put("two","2");
c_ht.put("three","3");
System.out.println(c_ht);
}
}
The output is : {two=2, one=1, three=3}
It should have been..:{one=1, two=2, three=3}
Is there a way i can get the values back in the same order that i inserted ..?
Thanks in Advance.
Gowri