Java Collection Framework

Source: Internet
Author: User
Tags array length

Collection Frame
A collection is also a container for storing data. An array that is primarily used to "override" an indeterminate number of objects.
Collections are used to store objects , and collections are distinguished from arrays because the set length is variable .
The collection container has many kinds, because the container itself has different characteristics, the internal data structure is different, and the container system is formed.
1, Set frame system:

2, the difference between an array and a collection

Arrays can store both the base data type and the reference data type, the base data type stores the value, and the reference data type stores the address value
A collection can store only reference data types (objects) in a collection or store basic data types, but it is automatically boxed into objects when stored
The array length is fixed and does not grow automatically.
The length of the collection is variable and can grow depending on the element's increase.

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.