> Rajesh.Rapaka schreef:
>
[quoted text clipped - 14 lines]
>
> Set keySet = Hashtable.keySet();
In addition Rajesh, if you don't have a copy of the API documentation, get
it from http://java.sun.com/javase/downloads/index.jsp It's the first place
to look for answers to questions like this.
Cheers,
Matt Humphrey matth@ivizNOSPAM.com http://www.iviz.com/
> Set keySet = Hashtable.keySet();
>
> Regards,
>
> Bart
Hi,
I guess according the algorithm of Hashtable, the key values are
shuffled. is there any possibility to get the keys in the order I
added?
say I added 1,2,3, & 4. But when I ask for key values I get 2,4,3 & 1.
Is there a posssiblity that i can get it as 1,2,3&4.
Thank you,
regards,
Rajesh Rapaka.
Bart Cremers - 26 Jul 2006 15:09 GMT
Rajesh.Rapaka schreef:
> I guess according the algorithm of Hashtable, the key values are
> shuffled. is there any possibility to get the keys in the order I
[quoted text clipped - 7 lines]
> regards,
> Rajesh Rapaka.
Not with a Hashtable. You'll need to use a LinkedHashMap to get that
behavior. Note that LinkedHashMap was only add to Java since v1.4.
Regards,
Bart