What does it mean when we say an ArrayList is not synchronized?

前端 未结 6 1532

What does it mean when we say an ArrayList is not synchronized?

Does it mean that if we declare an ArrayList in object scope, multiple threads accessing the objects hav

6条回答
  •  礼貌的吻别
    2021-02-07 05:46

    Does it mean that if we declare an ArrayList in object scope, multiple threads accessing the objects have the opportunity to modify the list ?

    Yes. If multiple threads operate on it at the same time, it may result in unexpected behaviour

提交回复
热议问题