Which scala mutable list to use?

后端 未结 4 1064
梦如初夏
梦如初夏 2020-12-13 13:33

This is a followup question to No Scala mutable list

I want to use a mutable list in Scala. I can chose from

  • scala.collection.mutable.DoubleLinkedList
4条回答
  •  执念已碎
    2020-12-13 14:16

    If you want to append items you shouldn't use a List at all. Lists are good when you want to prepend items. Use ArrayBuffer instead.

提交回复
热议问题