Java Collection Framework
JCF (Java collections Framework)
650) this.width=650; "title=" Qq20161104163835.png "src=" Http://s1.51cto.com/wyfs02/M01/89/C7/wKioL1gcSMGSe_ Draaedlgq-dby282.png-wh_500x0-wm_3-wmp_4-s_1749844768.png "alt=" Wkiol1gcsmgse_draaedlgq-dby282.png-wh_50 "/>
650) this.width=650; "title=" Qq20161104164157.png "src=" http://s1.51cto.com/wyfs02/M02/89/CA/ Wkiom1gcsomgvdjlaaalkwhth38597.png-wh_500x0-wm_3-wmp_4-s_4283188284.png "alt=" Wkiom1gcsomgvdjlaaalkwhth38597.png-wh_50 "/>
Collections
Collection provides an interface for some common operations on collections
Including:
Insert Add ()
Delete Remove ()
Determine if an element is not its member contains
Traverse iterator ()
list--ordered Collection
set--unordered Collection, no duplicate values allowed
map--Mapping
Set Preliminary
Familiarity with the use of ArrayList
Start learning to use the JDK API documentation
An implementation of the ArrayList ———— list interface
Ordered, allowing duplicate values to exist
Import java.util.*;
Class a{
public static void Main (String args[]) {
List<string> s=new arraylist<string> (); Add generic parameters when defining
S.add ("AAA");
S.add ("BBB");
S.add ("CCC"); add element
System.out.println (s);
S.remove (2); Delete Element
System.out.println (s);
System.out.println (s.get (0));
for (int i=0;i<s.size (); i++)//traversal
System.out.println (S.get (i));
}
}
Java Collection Framework Preliminary