Java Interview Summary--collection

Source: Internet
Author: User

1. Set tree view

Collection: The most basic set interface

----LIST: An ordered set in which elements in the collection can be repeated, access to elements in the collection can be accessed based on the index of the element

----ArrayList: Asynchronous

----LinkedList: Implements the dual interface of list and queue

----Vector: Synchronizing

----Stack: Last in, first out, synchronous

----Queue: A collection of first-in, first-out (FIFO) data structures

----LinkedList: Implements the dual interface of list and queue

----Set: Unordered collection, elements in the collection cannot be duplicated, with up to one null element

----Enumset: Enum type Private, single enum type, no null element, asynchronous

----SortedSet:

----TreeSet:

----HashSet:

----Linkedhashset:

MAP: Save Key-value to form elements, access only according to the key of each element to visit its value

----HASHMAP: Async, allow null, that is, null value and NULL key

----Weakhashmap: "weak reference" to key, if a key is no longer referenced externally, the key can be recycled by GC

----Hashtable: synchronous, NULL not allowed

2, SET STATISTICS information

3. Set traversal

Iterator (iterator): Hasnext () Next () Remove ()

Java Interview Summary--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.