Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


what’s the main difference between ArrayList / HashMap and Vector / Hashtable?


Vector / HashTable are synchronized which means they are thread safe. Cost of thread safe is performance degradation. So if you are sure that you are not dealing with huge number of threads then you should use ArrayList / HashMap.But yes you can still
synchronize List and Map’s using Collections provided methods :-
List OurList = Collections.synchronizedList (OurList);
Map OurMap = Collections.synchronizedMap (OurMap);
 

asked Sep 13, 2013 in oops by rajesh
edited Sep 12, 2013
0 votes
19 views



Related Hot Questions



Government Jobs Opening


...