Java Container Learning

Source: Internet
Author: User

A container is an important part of Java, and its interface is structured as follows

Collection

|

------------------Map

|        | |

Set List HashMap

|

HashSet

As the name implies, the container is used to store things, for objects, the container is essentially a reference to the object, that is, the object's address.

The collection interface has two sub-interfaces set and list, in addition to being used to store elements of this commonality, respectively, have different characteristics.

The container of the list category generally has an orderly character, when the element is inserted and deleted, the order of the elements is maintained, and duplicate elements can be placed.

The container of the set class does not allow repeating elements to be placed, and is generally unordered.

The container for the map category stores the object and the only mapping that can identify the primary key of the object, and cannot place duplicate primary keys.

Java Container Learning

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.