According to the classification of the collection (said the previous day), the first contact is ArrayList but like collection, he has no special function, skip directly, and then vector.
A Vector
A: Has a unique function
A: Add
public void addelement (E obj)--add ()
B: Get
Public E elementat (int index)--get ()
The main use is a second fetch. Let me give you an example.
Simplified writing under:
V.addelement ("Hello");
V.addelement ("Boy");
Enumeration e=v.elements ()//a bit similar to the meaning of iterators
while (E.hasmoreelements ()) {
String s= (String) e.nextelement ();
System.out.println (s);
}
Two LinkedList
Because it is the bottom of the list, according to the data structure is only, its additions and deletions compared to traverse, so the relative, Linklist is also, its unique features are:
Unique Features
A: Add
AddFirst ()
AddLast ()
B: Delete
Removefirst ()
Removelast ()
C: Get
GetFirst ()
GetLast ()
15th Day of Java Learning (linklist Vector)