Initial knowledge of the Java Collection Framework (Iterator, Collection, Map)

Source: Internet
Author: User

1. The Java Collection Framework provides a set of well-performing, easy-to-use interfaces and classes that are located in the Java.util package

Attention:

  • There are both interfaces and classes, the picture of the solid line is the class, the dotted line is the interface
  • Need to import Java.util package before use
  • List and set are sub-interfaces of collection, ArrayList and LinkedList are two implementation classes of list, HashSet and TreeSet are two implementation classes of set
  • Highlights: ArrayList, LinkedList and HashSet
  • A collection of map interfaces is a storage mechanism that stores data in the form of K-V key-value pairs, different from collection values
  • Iterator: After putting the data in the collection, it is generally done by looping through the data in the collection, Iterator is an iterator, and the iteration means that one is taken out, where he is the data used for an iterative collection or map.
  • Collections and arrays in utilities are some of the tool classes that manipulate collections, which provide some methods for manipulating collections, such as arrays in previous arrays, sorting arrays, and so on.

The 2.Collection interface stores a set of non-unique, unordered objects

the 2.1List interface stores a set of objects that are not unique, ordered (in order of insertion)

1

TD valign= "Top" width= "102" >

0

2

3

4

5

Aaaa

bbbb

Cccc

dddd

dddd

Fffff

The 2.2Set interface stores a unique, unordered set of objects

The 2.3Map interface stores a set of key-valued objects that provide a key-to-value mapping

Initial knowledge of the Java Collection Framework (Iterator, Collection, Map)

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.