how can we synchronize Hash map?

Answers were Sorted based on User's Feedback



how can we synchronize Hash map?..

Answer / vikram kc

Collections.synchronizedMap(hashMap)

Is This Answer Correct ?    18 Yes 2 No

how can we synchronize Hash map?..

Answer / ravikiran

Collections.synchronizedMap(new HashMap());

Is This Answer Correct ?    10 Yes 1 No

how can we synchronize Hash map?..

Answer / prabhu

hasgmap hs=new hashmap();
vector v =new vector (hs);

Is This Answer Correct ?    2 Yes 10 No

Post New Answer

More Core Java Interview Questions

Where is singleton pattern used?

0 Answers  


What flag up means?

0 Answers  


Where will it be used?

0 Answers  


What is high level language in computer?

0 Answers  


What is the maximum size of byte array in java?

0 Answers  


What does next mean in java?

0 Answers  


how to handle http request in struts

2 Answers   Polaris,


What is command line argument

0 Answers   TCS,


What happens if an exception is not caught?

6 Answers   Amazon,


Is a case study a method or methodology?

0 Answers  


can java object be locked down for exclusive use by a given thread? Or what happens when a thread cannot acquire a lock on an object? : Java thread

0 Answers  


What is difference between checked and unchecked exception in java?

0 Answers  


Categories