aspose file tools*
The moose likes Java in General and the fly likes Hashtable methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Hashtable methods" Watch "Hashtable methods" New topic
Author

Hashtable methods

sumit Sanghai
Greenhorn

Joined: Nov 05, 2004
Posts: 5
We know that Hashtable is synchronized. But not all the Hashtable methods are synchronized. Why?
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
because they don't access shared data.
There's seldom a good reason to use a Hashtable anyway.


Tony Morris
Java Q&A (FAQ, Trivia)
sander hautvast
Ranch Hand

Joined: Oct 18, 2002
Posts: 71
There's seldom a good reason to use a Hashtable anyway.

why is that?
Sudhakar Namasivayam
Greenhorn

Joined: Sep 09, 2004
Posts: 11
The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls.

http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html

http://www.coderanch.com/t/231485/threads/java/Hashtable-vs-HashMap


Regards,<br />Sudhakar<br /> <br />SCJP 1.4
Zhongbo Li
Greenhorn

Joined: Dec 06, 2003
Posts: 23
用打包的办法


SCJP,SCJD,软件设计师<br />Skype:mediumwave<br />QQ:85646604<br /><a href="http://www.yjping.com" target="_blank" rel="nofollow">http://www.yjping.com</a>
 
 
subject: Hashtable methods