Java collections maintaining insertion order

前端 未结 10 1111
忘了有多久
忘了有多久 2020-12-13 00:06

Why do some collection data structures not maintain the order of insertion? What is the special thing achieved compared to maintaining order of insertion? Do we gain someth

10条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-13 00:14

    some Collection are not maintain the order because of, they calculate the hashCode of content and store it accordingly in the appropriate bucket.

提交回复
热议问题