Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

What is the difference between Synchronized Collection and Concurrent Collection

Pragya Keshap answered on February 4, 2023 Popularity 3/10 Helpfulness 2/10

Contents


More Related Answers

  • difference between synchronized block and synchronized method example
  • Can we use synchronized block for primitives?
  • Difference between Lock Interface and synchronized keyword

  • What is the difference between Synchronized Collection and Concurrent Collection

    0

    In Java 1.5 many Concurrent collection classes were added in SDK.

    These are ConcurrentHashMap, CopyOnWriteArrayList,

    BlockingQueue etc.

    Java also provides utility methods to get a synchronized copy of

    collection like ArrayList, HashMap etc. by using

    Collections.synchronizedList(), Collections.synchronizedMap()

    methods.

    The main difference is in performance. Concurrent collection

    classes have better performance than synchronized collection

    classes because they lock only a portion of the class to achieve

    concurrency and thread-safety

    https://javarevisited.blogspot.com/2016/05/what-is-difference-between-synchronized.html#axzz7sNmYn2qu

    Popularity 3/10 Helpfulness 2/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 04 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.