File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes Collections.synchronizedMap? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Collections.synchronizedMap?" Watch "Collections.synchronizedMap?" New topic
Author

Collections.synchronizedMap?

Deepak Lal
Ranch Hand

Joined: Jul 01, 2008
Posts: 507

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


When The Going Gets Tougher,The Tougher gets Going
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18874
    
  40

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


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18874
    
  40

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
 
GeeCON Prague 2014
 
subject: Collections.synchronizedMap?