2021-05-10

ArrayList与LinkedList

  1. ArrayList和LinkedList的区别:
    (1)ArrayList是实现了基于动态数组的数据结构,LinkedList基于链表的数据结构。
    (2)对随机访问get和set,ArrayList优于LinkedList,因为LinkedList要移动指针。
    (3)对与新增和删除操作add和remove,LinkedList比较占优势,因为ArrayList要移动数据。

  2. LinkedList的一些特殊方法
    在这里插入图片描述


版权声明:本文为qq_52978084原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。