Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Raghda Ismail
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Pie
Posts: 21404
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Raghda Ismail
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic