JSP-14-common collection classes and interfaces, jsp-14-set Interfaces

Source: Internet
Author: User

JSP-14-common collection classes and interfaces, jsp-14-set Interfaces
List Interface

The List interface and implementation class are variable-capacity lists. They can access elements in a set by index and are ordered sets.

Arraylist is an array-based List that allows fast and random access. It is equivalent to the fact List that is not suitable for element insertion and removal.

The sequence list provides optimal sequential access and is suitable for inserting and removing elements.

 

Set Interface

The Set interface is a Collection that does not contain duplicate elements. That is to say, a Set can have at most one null element.

HashSet can quickly locate an element, but it requires that the object stored in HashSet must implement the HashCode () method.

TreeSet stores the elements in it in sequence.

Map Interface

Map is a container that associates a key object with a value object. Like Set, key objects in a map container cannot be repeated.

The HashMap class is the implementation class of the Map interface. It implements a key-to-value ing hash table and obtains value objects through keys.

The Properties class generally stores attribute files in the form of key-value pairs after they are read into the stream to facilitate programmers to read the data.

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.