Java collection Classes

Source: Internet
Author: User

Java Collection Class (i)

1.Java Collection Class

Java collection classes can be broadly divided into: set, List, Map three systems.

Set: Represents an unordered, non-repeatable collection.

List: Ordered, repetitive.

Map: A collection that has a mapping relationship.

1.5 New Plus:

Queue: A collection of queues implementation.

The collection classes are located under the Java.util package (for saving indeterminate data and saving associative arrays).

The collection class holds the object (a reference to the object).

Java Collection classes:

Are derived from the two interface: Collection and Map.

Inheritance tree of collection collection system

Map System Inheritance Tree

Map saves data: Key-value, which is composed of Key and value.

Example: Language-79, math-80, which is composed of subjects and grades.

Key: cannot be repeated such as: The account is not repeatable, the score can be the same

Retrieve the value data according to key, such as: Check the score according to the subject.

Diagram: Set, List, Map.

Access:

Set: Accessible only through elements.

List: Accessed through the index.

Map: Gets value by key.

For Set, List, Map the most common implementation class: HashSet, ArrayList, HashMap.

Java collection Classes

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.