Java containers include: ArrayList, LinkedList, Vector, HashSet, LinkedHashSet, TreeSet, LinkedHashMap, TreeMap, ConcurrentHashMap, Hashtable, etc.
The operating environment of this tutorial: windows7 system, java8 version, DELL G3 computer.
What is a container?
Container refers to a basic device used to hold materials and is mainly a shell.
The purpose of the Java container class library is to "save objects". Excerpted from: "Thinking in Java".
The Java collection class is a particularly useful tool class that can be used to store a varying number of objects and can implement commonly used data structures, such as stacks, queues, etc. A Java collection is like a container that can "throw" multiple objects (actually references to objects, but commonly called objects) into the container. Excerpted from: "Crazy Java Lecture Notes".
Containers in Java are also called collections, which are objects specially used to manage objects. This is what I am talking about.
What are Java containers?
Java containers are divided into two categories: Collection and Map, and there are many subclasses under them. The following is the inheritance system of Collection and Map:
##What is the difference between ArrayList and LinkList?
ArrayList (array structure):
:
The difference between List, Set and Map What is it? The difference between List, Set, and Map is mainly reflected in two aspects: whether the elements are ordered and whether duplicate elements are allowed.
The differences between the three are as follows:
What is the difference between HashMap and Hashtable?
What is the difference between Comparable and Comparator? Comparable interface
Recommended related video tutorials:
The above is the detailed content of What are the java containers?. For more information, please follow other related articles on the PHP Chinese website!