package org.vector;
import java.util.List;
import java.util.Vector;
public class VectorDemo01 {
public static void main(String[] args) {
List<String> allList = new Vector<String>();
allList.add("Hello");
allList.add(0,"World");
allList.add("chenfeipeng");
allList.add("www.hut.edu.cn");
for(int i = 0;i<allList.size();i++){
System.out.print(allList.get(i)+"、");
}
}
import java.util.List;
import java.util.Vector;
public class VectorDemo01 {
public static void main(String[] args) {
List<String> allList = new Vector<String>();
allList.add("Hello");
allList.add(0,"World");
allList.add("chenfeipeng");
allList.add("www.hut.edu.cn");
for(int i = 0;i<allList.size();i++){
System.out.print(allList.get(i)+"、");
}
}
}
package org.vector;
import java.util.Vector;
public class VectorDemo02 {
public static void main(String[] args) {
Vector<String> allList = new Vector<String>();
allList.add("Hello");
allList.add(0,"World");
allList.add("chenfeipeng");
allList.add("www.hut.edu.cn");
for(int i = 0;i<allList.size();i++){
System.out.print(allList.get(i)+"、");
}
}
}