Comparison of various collections

2010-03-29  来源:本站原创  分类:Java  人气:217 

Collections and the Collection of the difference between

Collections are java.util following classes. It includes a variety of collections of static methods

Collection is the following hug java.util mouth, which is the parent of a variety of collections hug mouth.

The difference between ArrayList and Vector

1. Synchrony: Vector is thread-safe, meaning that is synchronized, but ArrayList is the line of unsafe procedures, not synchronized 2. Data growth: When you need to grow, Vector defaults growth of the original one-pei, and the ArrayList it is half the original

The difference between HashMap and Hashtable

1. For historical reasons: Hashtable is based on the old Dictionary class, HashMap is a Java 1.2 introduced an implementation of the Map interface

2. Synchrony: Hashtable is thread-safe, meaning that is synchronized, while the HashMap is a line of unsafe procedures, not synchronized

3. Value: Only HashMap allows null values as you would a table entry key or value

The difference between HashMap and HashSet

Underlying HashSet is implemented by HashMap

相关文章
  • Comparison of various collections 2010-03-29

    Collections and the Collection of the difference between Collections are java.util following classes. It includes a variety of collections of static methods Collection is the following hug java.util mouth, which is the parent of a variety of collecti

  • [Transfer] Java Collections Framework Comparison 2010-12-17

    Comparison of Java Collections Framework Java array class Array is one of the most fundamental storage structure. It is used to store a set of contiguous objects or basic types of data. The type of elements which must be the same. array is the most e

  • Collection and General Collection [transfer] 2011-04-17

    Gong Yongsheng ( [email protected] ), Abstract: This paper describes the Jakarta project commons-collection, its current version is 2.1. This paper sets the framework for the collation and j2sdk sample can greatly speed up the example of programmers

  • Java collections of the Set () 2010-03-29

    Java collections in the collection is stored in an object reference, rather than the object itself, for the convenience of expressing, referred to as "a collection of objects." Set (set): the objects in the collection are not arranged according

  • [Change] Comparison of four kinds of operation mode XML 2008-12-09

    1. Introduction 1) DOM (JAXP Crimson parser) DOM is platform-and language-independent manner in the official W3C standard XML documents. DOM is a hierarchical organization of nodes or a collection of pieces of information. This hierarchical structure

  • Four kinds of operation xml ways: SAX, DOM, JDOM, DOM4J comparison 2009-09-07

    1. Introduction 1) DOM (JAXP Crimson parser) DOM is platform-and language-independent manner in the official W3C standard XML documents. DOM is a hierarchical organization of nodes or a collection of pieces of information. This hierarchical structure

  • Reprinted java collections 2009-09-24

    Help and differences between collections Collection ├ List │ ├ LinkedList │ ├ ArrayList │ └ Vector │ └ Stack └ Set Map ├ Hashtable ├ HashMap └ WeakHashMap Collection Interface Collection is the most basic set of interfaces, a Collection on behalf of

  • Java: Performance Analysis of collections [change] 2008-05-17

    This article is transferred, and no verification of the correctness of the article, I have time will be carefully checked, everyone If you have time, you can also help to test, and then the process will be issued with the results look. 1.Java collect

  • java.util collections Xiangjie 2010-03-26

    Doing Java development, we often want to use some of the data collection, JDK provides us with a range of application classes to implement basic data structures. These classes are in the java.util package. A brief description of this: Collection List

  • [Change] Comparison of the four operating mode XML 2010-03-11

    1. Introduction 1) DOM (JAXP Crimson parser) DOM is platform-and language-independent manner, said the official W3C standard XML document. DOM is a hierarchical organization of nodes or pieces of information collection. This hierarchy allows the deve

  • C #. NET collection object (System.Collections) 2010-03-28

    1. System.Array and System.Collecions.ArrayList The former is an abstract base class for all arrays, each instance of an array is to create an instance of Array type; which can create an array of variable size. Both can use BinarySearch query, but mu

  • Concurrent Collections 2010-04-07

    CopyOnWriteArrayList ConcurrentHashMap and provide thread-safe and has improved scalability Appears in the Java class libraries associated with the first set of classes is Hashtable, which is part of JDK 1.0. Hashtable provides an easy-to-use, thread

  • Java Collections Xiangjie (a) 2010-04-11

    Java Collections Xiang Jie (1) A brief account of Java collection class is a very important basic technology content. Java collection class encapsulates a collection of commonly used data structures and algorithms, so the learning process of Java may

  • Comparison of several communication protocols 2010-04-16

    I. Summary This article compares the RMI, Hessian, Burlap, Httpinvoker, web service protocols such as five kinds of data structures in different quantities and different data transmission performance. RMI is the java language itself provides remote c

  • [Change] Java in the way of comparison of four operating xml 2010-04-17

    1. Introduction 1) DOM (JAXP Crimson parser) DOM is platform-and language-independent manner, said the official W3C standard XML document. DOM is a hierarchical organization of nodes or pieces of information collection. This hierarchy allows the deve

  • java in the collections Xiangjie 2010-04-22

    The size of the array is fixed and can only contain the same type as an array of data (basic type / reference type) JAVA collection can be stored and the operation number is not fixed, a set of data. All collections are located in the java.util JAVA

  • JAVA XML parsing approach DOM.SAX.DOM4J.JDOM.StAX Illustration and comparison of 2010-06-05

    1. Wapakhabulo in various ways 1) DOM (JAXP Crimson parser) DOM is platform-and language-independent manner, said the official W3C standard XML document. DOM is a hierarchical organization of nodes or pieces of information collection. This hierarchy

  • Comparison of the size of objects in java 2010-06-10

    Comparison of the size of objects in java Comparing the size of java objects There are two ways 1: Implement Comparable interface public int compareTo (T o) method; 2: Implement Comparator interface int compare (T o1, T o2) method; Code: import java.

  • On the Java Collections API 5 things you do not know, Part 2 2010-06-24

    java.util Collections in class to improve Java performance by replacing the array. As you learned in Part 1, they are changeable and can customize and extend a variety of ways to help achieve high-quality, simple code. Collections are very powerful,

  • Java theory and practice: Concurrent collections 2010-07-26

    DougLea of util.concurrent package contains many other useful addition to the concurrency building blocks but also contains a collection of some of the major types of List and Map of high-performance, thread-safe implementation. In this month's Java