How can you say HashMap is syncronized?

Answer Posted / aruna kadaari

By using the below statment we can stnchronize the hashmap


Hashmap hm = new Hashmap();
Map m = Collections.synchronizedMap(hm);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why does my function print none?

531


Is java 1.7 the same as java 7?

548


Can we increase array size dynamically in java?

521


What is the java project architecture?

1795


What is the difference between the prefix and postfix forms of the ++ operator?

567






Howto get an object that will perform date & time calculations then format it for output in some different locales with different date style.can ne1 tel me the answer of this question.pls

1454


What is the difference between menuitem and checkboxmenu item?

794


What are the different tags provided in jstl?

561


List the interfaces which extends collection interface?

547


What are the classes of java?

543


Can It is possible to synchronize the constructor of a Java Class?

608


What are features of java?

568


How do you check if a string is lexicographically in java?

505


Can a java program have 2 main methods?

561


What is the destroy method?

602