Java Collection source code anatomy Java Collection Framework

Source: Internet
Author: User

The Java Collection Toolkit is located under Package java.util. Contains a number of commonly used data Structures , such as arrays, lists (single/bidirectional), tree, stack, queue, hash table and so on.

The Java Collection framework can be broadly divided into five parts: list lists, set sets, map mappings, iterators (Iterator, enumeration), tool classes (Arrays, collections).

The overall framework for the Java Collection class is as follows:

  

, the Java collection classes are broadly divided into two broad categories:Collection and Map.

Collection mainly consists of two parts: list and set.

The list interface typically represents a single listing (array, linked list, queue, stack, and so on) whose elements can be duplicated. The main implementations are: ArrayList, LinkedList, and less commonly used vectors (thread-safe, low-performance). In addition, the LinkedList implements the Deque (bidirectional queue) interface with the features of the stack and queue.

The set interface usually represents a collection, and the element does not allow duplication. The main implementations are: HashSet, TreeSet

Java Collection source code anatomy 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.