importjava.lang.System;
importjava.util.Vector;
importjava.util.Emumeration;
publicclassAvector{
publicstaticvoidmain(Stringargs[])
{
0. Vectorv=newVector();
1.v.addElement("one");
2.addElement("two");
3.v.addElement("three");
4.v.insertElementAt("zero",0);
5.v.insertElementAt("oop",3);
6.v.setElementAt("three",3);
7.v.setElementAt("four",4);
8.v.removeAllElements();
}
}
Vector中的变更情形:
1.one 2.one 3.one 4.zero 5.zero 6.zero 7.zero
8.
two two one one one one
three two two two two
three oop three three
three three four