The most common class that implements List is Vector. : Vector « Utility Classes « SCJP

Home
SCJP
1.Java Source And Data Type
2.Operators
3.Modifiers
4.Type Casting
5.Statements
6.Object Oriented
7.Thread
8.Utility Classes
9.File
SCJP » Utility Classes » Vector 
8.14.1.The most common class that implements List is Vector.
The methods of Vector are synchronized.


import java.util.Iterator;
import java.util.Vector;

public class MainClass {
  public static void main(String[] argv) {
    Vector vec = new Vector();
    for (int i = 101; i <= 110; i++)
      vec.add(i);

    Iterator iter = vec.iterator();
    while (iter.hasNext())
      System.out.println(iter.next());

  }
}
101
102
103
104
105
106
107
108
109
110
8.14.Vector
8.14.1.The most common class that implements List is Vector.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.