Meaningless Drivel is fun!*
The moose likes Threads and Synchronization and the fly likes what does it mean that hashtable is synchronized and hashmaps are not? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "what does it mean that hashtable is synchronized and hashmaps are not?" Watch "what does it mean that hashtable is synchronized and hashmaps are not?" New topic
Author

what does it mean that hashtable is synchronized and hashmaps are not?

Raghda Ismail
Greenhorn

Joined: Feb 22, 2009
Posts: 23
hi everybody ,
please i need to know what does it mean that hash table is synchronized and hash maps are not?

Thanks
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18750
    
  40

Raghda Ismail wrote:please i need to know what does it mean that hash table is synchronized and hash maps are not?


It just means that the methods of the Hashtable class are declared as synchronized, while the methods of the HashMap class are not. As for what that means, you can start with the Sun tutorial on threads...

http://java.sun.com/docs/books/tutorial/essential/concurrency/

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Raghda Ismail
Greenhorn

Joined: Feb 22, 2009
Posts: 23
thanks Henry
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what does it mean that hashtable is synchronized and hashmaps are not?