This is a mirror of official site: http://jasper-net.blogspot.com/

Difference between HashMap and HashTable? Can we make hashmap synchronized?

| Tuesday, January 25, 2011
This question oftenly asked in interview to check whether candidate understand correct usage of collection classes and aware of alternative solutions available.

1. The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls. (HashMap allows null values as key and value whereas Hashtable doesn't allow nulls).
2. HashMap does not guarantee that the order of the map will remain constant over time.
3. HashMap is non synchronized whereas Hashtable is synchronized.
4. Iterator in the HashMap is fail-safe while the enumerator for the Hashtable isn't.

Note on Some Important Terms
1)Synchronized means only one thread can modify a hash table at one point of time. Basically, it means that any thread before performing an update on a hashtable will have to acquire a lock on the object while others will wait for lock to be released.

2)Fail-safe is relevant from the context of iterators. If an iterator has been created on a collection object and some other thread tries to modify the collection object "structurally", a concurrent modification exception wjavascript:void(0)ill be thrown.

Read more: TIBCO RV FIX PROTOCOL JAVA TUTORIAL

Posted via email from Jasper-net

26 comments:

Anonymous said...

http://orodemoyikisolicitors.com/Blogger/topic.php?id=34539&replies=1#post-38579

http://www.conscienceinstitute.org/bbforum/topic/wwwlongchamppursepariscom-521174#post-28200

http://ask-a-geek.com/members/usamelvnb/activity/215148

http://mixtapepushers.com/members/usakmoliuhy/activity/205230

http://trandadesign.pl/support/topic/wwwlongchamppursepariscom-521111?replies=1#post-116468

http://community.myaspenheights.com/members/usaxfdgaf/activity/218285

http://7minutesisallyouneed.com/members/usanwiatj/activity/56112

http://becauseiride.com/dfg/wwwlongchampbagspursecom-dl2735

http://forum.tscbusinessgroup.com/members/usawgrxak/activity/120219

http://www.noobworksstudio.com/forum/topic.php?id=34430&replies=1#post-36791

http://thedigitalsandbox.org/drupaltest/?q=node/345222

http://bigmuddyimc.org/node/6708

http://www.wkgtactical.com/wordpress/wp-content/plugins/bbpress/topic.php?id=56256&replies=1#post-59654

http://www.arka.vrn.ru/forum/topic.php?id=1056&replies=1#post-1579

http://www.bonaverba.com/drupal/Drupal6.12/node/153741

http://cdu2.dip.jp/drupal/node/30274

http://holisti.ca/members/usa321/activity/1925

http://ymobi.ru/bbpress/topic/wwwlongchampbagspursecom-dl2939?replies=1#post-3902

http://austinstevens.com/portal/?q=node/32994

http://forum2.globalwaronline.com/topic.php?id=287971&replies=1#post-316047

Anonymous said...

http://imperial.absoc.co.uk/forum/topic.php?id=175916&replies=1#post-189675

http://tributerealestate.com/members/usabcduer/activity/2509

http://www.yuvajunctionnews.com/members/usaedbsiu/activity/3870

http://archive.ericsaadedaily.com/read_blog/85527/www.longchamppurseparis.com-184

http://1sitebusiness.com/members/usaboxlox/activity/2862

http://www.futoukou.com/bb/topic.php?id=11674&replies=1#post-14446

http://www.softwarefordemocracy.org/sfd/node/add/story

http://ejemplos.webconstructoronline.com/bbpress/topic.php?id=134598&replies=1#post-145650

http://medicaldiary.org/groups/www-longchampbagspurse-com-dl2937/

http://550shop.com/forum/topic.php?id=112676&replies=1#post-121944

http://server.grul.se/paraplyet/node/103291

http://www.saggerzone.com/videos/read_blog/230733/www.longchamppurseparis.com-165

http://dage.fr/forum/topic.php?id=21906&replies=1#post-51236

http://mormon-stories.com/node/14601

http://www.bantugeeks.com/members/usaiyfupf/activity/9590

http://k-trucker.com/community/forums/topic.php?id=3543&replies=1#post-3934

http://elchiverio.com/miembros/usayhtgfvcd/activity/236

http://sharemypost.com/read_blog/435969/www.louisvuittonoutletukusa.com-fj4711

http://www.365friendz.com/members/usahwedns/activity/2067/

http://cyber-activist.com/blog/view/195266/wwwlongchamppursepariscom-52111

Anonymous said...

http://watyagot.com/forum/topic.php?id=103693&replies=1#post-112135

http://www.ninersintheminors.com/Forum/topic.php?id=189600&replies=1#post-212385

http://mybeautifulbump.com/bumps/usaftydopba/activity/365

http://angeltodemon.com/members/usanpcafz/activity/715968

http://www.itimarconi.ct.it/facebook/wordpress/members/usarwtgki/activity/12861

http://retekram.net/san_imate/node/106099

http://mbaprep.co.in/members/usaowpnhu/activity/994120

http://conservativechronicleforum.com/topic.php?id=669625&replies=1#post-711855

http://linternat.gaumont.fr/forum/topic.php?id=20315&replies=1#post-27159

http://pianotune.com.au/node/291928

http://www.businessideas.tv/forum/topic.php?id=103639

http://dogma.rxfly.net/bbpress/topic.php?id=4475&replies=1#post-6632

http://www.choco.org.uk/chocodb/wp-content/plugins/bbpress/topic.php?id=4133&replies=1#post-4586

http://gadgeti.net/topic.php?id=464167&replies=1#post-477650

http://niloese.dk/bbpress/topic.php?id=17694&replies=1#post-18755

http://www.areyouprogrammer.com/topic.php?id=8343&replies=1#post-10671

http://forum.nbc-cs.de/topic/43426?replies=1#post-43450

http://www.karunagappally.in/kalink/members/usamax321/activity/4858

http://forum.oneswarm.org/topic/10382#post-28199

http://avtor-style.ru/wwwlongchampbagspursecom-dl3884-usaesihve

Anonymous said...

http://www.hermesbeltsusa.com/ hermes belt bntk longchamp bags DvePhe 5867cnx
ovzaafmz hermes birkin jwno

Rmivz ppwdfl longchamp handbags 8271
htqpmuvu hermes bags fveg

ishw longchamp sale XjpPt paris q 1224
unmafrpep chanel wallet qkas

Bhxem vvbmxl longchamp le pliage tyh1910
bksurgz chanel bag kaik

Ayqvq chanel handbags thastp
Wbs chanel outlet dx ibh chanel paris swv
Ufihl longchamp wfbs chanel purse ei chanel mkquzm
Bgh chanel outlet pr zny chanel handbag cnd
Srz chanel purses cy hermes fnv chanel online store pkq
Fph chanel bags th mf hermes bags u hermes belt cgr

Anonymous said...

http://www.louisvuittonpursesusauk.com/ louis vuitton purses xjer louis vuitton bags FisDrk 0458clr
bqhlaaid louis vuitton purses mhnr

Jodiv ilxysn louis vuitton handbags 0877
dvnzfuvu louis vuitton belt mhhf

ncfo louis vuitton sale IrgPs paris t 3996
gbhmeswhh louis vuitton outlet online dien

Sanfl lujfbq louis vuitton snh3344
jkkcrhb louis vuitton wallet bjrv

Bfqyf louis vuitton handbags yfezpu
Sjx louis vuitton outlet db jpz louis vuitton paris xpo
Tjhrq louis vuitton smnq louis vuitton purse ai louis vuitton qzyyel
Jnu louis vuitton outlet im gin louis vuitton handbag xvq
Civ louis vuitton purses in louis vuitton fzs louis vuitton online store hrn
Dgi louis vuitton bags lw lf louis vuitton bags p louis vuitton belt dmh

Anonymous said...

xNrq cheap ghd
cOnb ugg store
kMdm michael kors bags
5oCqu cheap uggs
0nYdc chi
2oGzf michael kors outlet
4xQvf nfl jerseys
9bYvt ghd
2qZff cheap north face
8gTcf ugg
6sGbf mini ghd
3sVks michael kors sale
8cYny cheap nfl jerseys
1xJkk ghd
4uClh ugg sale

Anonymous said...

ghd nz xiskrtjn ghd nz sale rbhzbero ghd somymjka

Anonymous said...

buy tramadol online tramadol 100mg seizure - tramadol dosage and dogs

Anonymous said...

buy tramadol online order tramadol online next day - buy tramadol cheap no prescription

Anonymous said...

generic xanax xanax drug of choice - xanax online no rx

Anonymous said...

where can i order xanax online xanax 5mg effects - ordering xanax online without prescriptions

Anonymous said...

xanax drug long does 1mg xanax xr last - xanax prescription online no prescription

Anonymous said...

buy cialis without doctor prescription buy cialis 5mg online - купить cialis риге

Anonymous said...

buy tramadol online generic tramadol images - ultram side effects headache

Anonymous said...

buy cialis online reviews for cialis daily - order cialis online paypal

Anonymous said...

xanax online does xanax show up on military drug test - does xanax show up 9 panel drug test

Anonymous said...

buy tadalafil online cialis and poppers - cialis daily tablet

Anonymous said...

xanax online xanax employee drug test - xanax effects wiki

Anonymous said...

buy cialis online cialis e20 review - cialis online sale

Anonymous said...

http://buytramadolonlinecool.com/#50897 tramadol hcl 50 mg get you high - buy tramadol online reviews

Anonymous said...

http://reidmoody.com/#54126 buy lorazepam drug - effects ativan addiction

Anonymous said...

ativan mg break ativan addiction - ativan dosage long does last

Anonymous said...

buy ativan online buy sandoz lorazepam - ativan dosage nausea

Anonymous said...

http://staam.org/#10699 best place buy tramadol - tramadol 50mg high

Anonymous said...

http://staam.org/#90723 tramadol overdose symptoms - buy tramadol online new zealand

Anonymous said...

xanax without a perscription klonopin xanax high - order xanax legally