For the Java Collection understanding

Source: Internet
Author: User

First, the three main interfaces of the set frame

Collection: Root interface of all classes map: Map interface, store key value pair Iterator: Iterate interface for iterating over set

Collection Sub-interfaces:

List: An orderly interface, an orderly deposit of elements

List common Interface Implementation classes: ArrayList, LinkedList, Vector

      

Set: No duplicate collection, that is, the set element that is deposited is not duplicated

Map interface: The map interface holds the key value pairs namely: Map<key,value>, where the key value is not allowed to repeat, if there are duplicates, then

Put (k key, V value), save the value of key with a map

Get (object k), which returns the value of value according to the values of K

Size (), returns the number of key-value teams

Implementation classes for MAP interfaces: HashMap, TreeMap

      

For the Java Collection understanding

Related Article

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.