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

Can an unreachable object become reachable again?

3 Answers  


What is meant by final class?

0 Answers  


What is wrapper class example?

0 Answers  


What is string literal in java?

0 Answers  


What restrictions are placed on method overriding?

0 Answers  






Can a abstract class be defined without any abstract methods?

0 Answers  


What is the use of conditional statement?

0 Answers  


What do you mean by constructor?

0 Answers  


In the below example, what will be the output?

0 Answers  


Write a program to reverse array in place?

0 Answers  


What about anonymous inner classes in java?

0 Answers  


What are the differences between processes and threads?

0 Answers  


Categories