Java Collection Framework Detailed

Source: Internet
Author: User

Java Collection Framework Detailed

  First, the direct difference between collection and collections

Collection is the interface under the Java.util package, which is the parent interface of the collection frame hierarchy. The common inheritance of this interface is the list and set. You can insert, delete, and determine whether an element is a member, Traverse, and so on, in a collection element.

Collections is the tool class under the Java.util package, providing information about finding, sorting, replacing, threading, and so on in collections

Second, List interface

ArrayList: The underlying structure is an array, query fast, insert and delete slow, non-thread-safe when the array exceeds the initial capacity will be expanded by 50% expansion

LinkedList: The underlying structure is linked list, slow query, insert and delete fast, non-thread safe

Vector: The underlying structure is an array, thread-safe, either insert or query is particularly slow to extend by 100% of the array

Java Collection Framework Detailed

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.