Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9171785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:12:38+00:00 2026-06-17T16:12:38+00:00

In some android open source code I found private Map<ImageView, String> imageViews=Collections.synchronizedMap(new WeakHashMap<ImageView, String>());

  • 0

In some android open source code I found

 private Map<ImageView, String> imageViews=Collections.synchronizedMap(new
 WeakHashMap<ImageView, String>());

can any one explain me difference between Normal Map and collections.synchronizedmap

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:12:39+00:00Added an answer on June 17, 2026 at 4:12 pm

    The regular Map implementations in java.util package are not thread safe. This means that if multiple threads are doing get() or put() operations on the same Map, it may result in race conditions or inconsistent data in the Map.

    To use an existing Map in a multi-threaded environment, you can get a synchronized instance of the same by calling Collections.synchronizedMap(). On such instances, most of the methods like get(), put and keyset() are synchronized and can be safely used concurrently.

    For more information on this, refer to
    http://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#synchronizedMap(java.util.Map)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Since Android 4 has some nice new APIs, and since Android is Open Source,
I use Eclipse to study some open source projects on Android. I keep seeing
I cloned some of the trees from the Android Open Source Project to take
The Android (Open Source Project) native launcher source code seems to be missing the
I'm developing some Android application, and I need to look at source code of
ATM, I'm searching through open source/close source android applications to identify particular concerns (code
After long search in repo folders I found rhino1_7R2.jar for Android at http://code.google.com/p/android-scripting/source/browse/rhino/rhino1_7R2.jar Unfortunately
I'm new to java/android and trying to help out with an open source project.
I'm debugging some open source email client in android right now but I have
I have the .proto file used in the open-source Android API (http://code.google.com/p/android-market-api/), and am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.