aspose file tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Is Hashtable deprecating? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "Is Hashtable deprecating?" Watch "Is Hashtable deprecating?" New topic
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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Is Hashtable deprecating?
 
Similar Threads
looping though and change the int value
Add Hastable obj to a Vector?
Hashtable elements to vector
Collection
Enumeration vs Iterator