All the collection-related implementation classes in Java are implementation classes of these six interfaces

Source: Internet
Author: User

All the collection-related implementation classes in Java are implementation classes for these six interfaces.

Collection interface: Each element in the collection is an object, which organizes the objects together to form a one-dimensional structure.

The list interface represents the organization of elements in a certain order of relevance (in which the order is predominant), and the data in the list interface is repeatable.

The set interface is the concept of a set in mathematics: its elements are unordered and cannot be duplicated. (corresponds to the list exactly)

The SortedSet arranges the elements according to numbers as "sortable collections".

Each element in the map interface is not an object, but a key-value pair (Key-value) that consists of a key object and a value object.

1  Packagetomtexts;2 3  Public classtomtexts_03 {4      Public Static voidMain (string[] args)5{String s1= ' hello,java! ';6        intI=s1.length ();7System.out.println ("string S1 length =" +i);8     }9 Ten}

All the collection-related implementation classes in Java are implementation classes of these six interfaces

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.