Java Collection Framework

Source: Internet
Author: User
Java Complete container classification diagram

(Image source:)

The dot-wireframe represents the interface, the solid wireframe represents the normal (specific) class, the dot line of the hollow white Arrow indicates that a particular class implements an interface, and a solid black arrow indicates that a class can produce an object that the arrow points to the class.

The difference between ArrayList and LinkedList

The underlying data structure of ArrayList is an array, which excels at random access to elements, and the time complexity of finding elements using Subscripts is O (1), but it is slower to insert and remove elements in the middle of ArrayList.

LinkedList's underlying data structure is a two-way loop linked list, does not support random access, using subscript to find elements of the time complexity is O (n), but in the middle of linkedlist insertion and deletion cost less, faster than ArrayList. (Note: Specific questions, please specific analysis, not necessarily linkedlist fast)

 

Java Collection Framework

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.