This is a problem that you often encounter in an interview. Tell you to write about the difference between the three ArrayList.LinkedList.Vector: The original has been confused, do not know what the difference between the three. Hey, ashamed, the foundation is too bad Ah, Wood has a way ah
Now it's time to talk about the differences and connections between the three: these are all implemented the list interface, have the list interface definition of the method, and also has a collection interface method;
ArrayList: Using an array of methods to store data, query and modify the speed, but the increase and deletion speed is slow; threads are not synchronized
LinkedList: The use of a linked list to store data, query and modify the speed is slow, but the increase and delete faster
Vector: is also used in the way of array storage, vector used before java1.0, but ArrayList is used after the java1.2 version, the thread is synchronized, the efficiency is slower than ArrayList, and vector query data has an iterator , there are enumerations, there are get (int index), there are four ways of indexof (int index), while ArrayList does not enumerate