"A disadvantage to using data shared among multiple
Java threads is that access to the data must be synchronized to
avoid an inconsistent view of the contents, which could result in
application failures. For example, the Hashtable class's put() and
get() methods are synchronized. Synchronization is required so
simultaneous put() and get() methods have sole access to the data
when executing; otherwise, application data structures might get
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.