how to make hashmap object as synchronized object?

Answers were Sorted based on User's Feedback



how to make hashmap object as synchronized object?..

Answer / parishudh

Collections.synchronizedMap(<your hashmap reference>)

Is This Answer Correct ?    12 Yes 1 No

how to make hashmap object as synchronized object?..

Answer / aroyal

Thanks

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Core Java Interview Questions

they asked class A{} class B{} class c{} all the three class saved as a single file,there is no main method in the file and anothe class M.java class m { psvm(String args[]) { // here the parent class can access } }

2 Answers   DNS, IPSR Solutions,


Does java trim remove newline?

0 Answers  


What is the difference between a field variable and a local variable?

0 Answers  


which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?

6 Answers   HP, SparkTG,


What is difference between module and function?

0 Answers  


What is array pointers ?

0 Answers   Amdocs,


What is a top level class in java?

0 Answers  


What is codebase?

0 Answers  


Package1 and Package2 both have a method name lets say "methodA" with different implementation. When I import both the packages in a java class how can I use both the methods?

7 Answers   Ericsson,


Can we sort hashset in java?

0 Answers  


Do you know thread pools?

0 Answers   BMC,


Is java supports multiple inheritance? explain?

12 Answers   BUET, Inforica,


Categories