import java.util.ArrayList;
import java.util.Vector;
public class Main {
public static void main(String[] args) {
ArrayList arrayList = new ArrayList();
arrayList.add("1");
arrayList.add("2");
arrayList.add("3");
Vector v = new Vector();
v.add("4");
v.add("5");
// append all elements of Vector to ArrayList
arrayList.addAll(v);
for (String str : arrayList)
System.out.println(str);
}
}
/*
1
2
3
4
5
*/