New Java Collection

Source: Internet
Author: User

for me, the collection class is one of the most powerful tools, especially for use in original programming. You may have sensed that I was somewhat disappointed with the collection provided by Java 1.1. So it's really nice to see that Java 1.2 has brought the correct attention back to the collection. this The collection of versions has also been completely redesigned (by Sun's Joshua B Loch). I think the new design collection is one of the two most important features of Java 1.2 (the other is the swing library, which will be described in the 13th chapter), because they greatly facilitate our programming and make Java a more mature programming system. Some designs make the integration of elements closer and easier to understand. For example, many names become shorter, clearer, and easier to use; Some of the names were modified to be more popular: The one I felt particularly good was the substitution of "enumerations" (enumeration) with "Iterators" (Iterator). The redesign also reinforces the function of the collection library. The new behaviors now include linked lists, queues, and undo teaming (the "double End Queue").


(1) Collection (Collection): A set of separate elements , usually with some kind of rule applied. Here, a list must hold elements in the order of a specific


(2) Mapping (MAP): A series of "key-value" Yes (this has been fully reflected in the hash table). From the surface, this seems to be
is a "collection" of "key-value" pairs, but if you try to implement it that way, you will find the implementation process rather clumsy. This further permits
Understanding should be separated into separate concepts. On the other hand, you can easily view a portion of a map. Just create a collection and then use it to table
Part of the show. In this way, the MAP can return a set of its own keys, a list containing its own values, or a "key
-a list of value pairs. Like arrays, maps can be easily extended to multiple "dimensions" without any new concepts involved. Simply place a
Map contains other maps (which can contain more maps, and so on).

New Java Collection

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.