The collation of the following collection classes in Java

Source: Internet
Author: User

I have seen some of the contents of the Java Collection class before, but after a while not some forget, now tidy up later to see also convenient, just for yourself as notes to see ~ ~ ~

(Reproduced some annotated: http://www.cnblogs.com/leeplogs/p/5891861.html)

In general, the collection classes that we use often have these kinds:

List structure Collection class: ArrayList class, LinkedList class, Vector class, Stack class

The collection class of the map structure: HashMap class, Hashtable class

Set structure of the Set class: HashSet class, TreeSet class

A collection of queue structures: Queue interface

First of all, let's see why we want to use the collection class, which is about the relationship between the collection class and the array. An array (which can store the base data type) is a container for storing objects, but the length of the array is fixed and not suitable for use when the number of objects is unknown.

The length of the collection (objects can only be stored and object types may be different) is variable and can be used in most cases. The bottom of the collection, is how to achieve variable length, here we come back to analyze, ...

Java Collection Framework diagram visible

The collation of the following collection classes in Java

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.