Forums Register Login

Collections.synchronizedMap?

+Pie Number of slices to send: Send
Hi,
I need a clarification on the below.

1>

what does the above statament mean and how is synchronization internally carried on when synchronizedMap(K,V) is called.Please explain me in lehman terms...

2> What is StackOverflowError,when does it occur in a java program, how do you resolve it in java.?
Could you provide me steps to overcome StackOverflowError ??


Help provided will be highly appreciated.

--
Deepak Lal
+Pie Number of slices to send: Send
 

Deepak Lal wrote:Hi,
I need a clarification on the below.

1>

what does the above statament mean and how is synchronization internally carried on when synchronizedMap(K,V) is called.Please explain me in lehman terms...



There is no such method, of the Collections class, call synchronizedMap(), that takes two parameters. There is one that takes a map, and it basically returns a wrapper class. It will return a Map class, whose methods are synchronized, and whose implementation is to just call the map that was passed in.

Henry
+Pie Number of slices to send: Send
 

2> What is StackOverflowError,when does it occur in a java program, how do you resolve it in java.?
Could you provide me steps to overcome StackOverflowError ??



This forum is for threading and synchronization (which is related to threading) questions only. Please post this question in a more appropriate forum.

Henry
Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1744 times.
Similar Threads
Generics are going to be the death of me.
Generic Declaration
Set & List interface extend Collection, so Why doesn't Map interface extend Collection?
Map does not extend Iterable. Why ?
Hung threads caused by HashMap in dom4j?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 15:50:09.