| Author |
Is Hashtable deprecating?
|
Anna Hays
Ranch Hand
Joined: Nov 09, 2003
Posts: 131
|
|
I think I heard/read that Hashtable is deprecating, it is true?? I want to use Hashtable for 2 purposes in my Data class 1. its synchronized methods 2. keeping value pairs I can't use Vector for that because I am using recNo as a key to keep the lockCookie. Vector will just have millions of elements if there are millions of records. I can't find any thing else except Hashtable. Thanks for any suggestions!
|
 |
George Marinkovich
Ranch Hand
Joined: Apr 15, 2003
Posts: 619
|
|
Hi Anna,
Originally posted by Anna Kafei: I think I heard/read that Hashtable is deprecating, it is true?? I want to use Hashtable for 2 purposes in my Data class 1. its synchronized methods 2. keeping value pairs I can't use Vector for that because I am using recNo as a key to keep the lockCookie. Vector will just have millions of elements if there are millions of records. I can't find any thing else except Hashtable.
As far as I know Hashtable is not deprecated (although it may be some time in the future). I think you can still use it. However, if you want to modernize you can look at HashMap, and if you need synchronized methods you could investigate the synchronizedCollection method in the java.util.Collections class. Hope this helps, George
|
Regards, George
SCJP, SCJD, SCWCD, SCBCD
|
 |
 |
|
|
subject: Is Hashtable deprecating?
|
|
|