Java Collection Framework (i)

Source: Internet
Author: User

Java Collection Framework Overview Java Collection Concepts

Java Collection class: A tool class, like a container, that stores any number of objects with common attributes.

The role of the Java collection

1. Within the class, the data is organized;

2. Simple and fast search for large numbers of entries;

3. Some collection interfaces, which provide a series of orderly elements, and can quickly insert or delete the relevant elements in the sequence;

4. Some collection interfaces, which provide a mapping relationship, can be used to quickly find the corresponding unique object through the keyword (key), which can be any type.

Array and Collection comparisons

1. Fixed length of array, variable length of Set

2. Arrays can only access elements by subscript, types are fixed, and some collections may find specific objects that are mapped by any type.

Java Collection Framework Architecture

The Java collection consists of two major families, collection and map;

Collection//Three sub-interfaces store individual objects

--1.list;//ordered, repeatable; more commonly known as sequences

1.1 list-->ArrayList //array sequence

2.Queue; Arranged in an orderly, repeatable manner; Also known as queues

2.1 queue-->linkedlist (linkedlist<--list)/Chain list

3.Set//unordered, non-repeatable; more commonly used; also known as set

3.1 set-->HashSet //hash Set

Map (<key,value> entry Class)//key value pair key and value can be of any type

-HashMap

------above are more commonly used------

Reference Material: MU-class network http://www.imooc.com/video/2415

       

Java Collection Framework (i)

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.