I have a double ArrayList
in java like this.
List values = new ArrayList(2);
Now what I want t
import java.util.*;
public class HelloWorld{
public static void main(String []args){
List threadSafeList = new ArrayList();
threadSafeList.add("A");
threadSafeList.add("D");
threadSafeList.add("F");
Set threadSafeList1 = new TreeSet();
threadSafeList1.add("B");
threadSafeList1.add("C");
threadSafeList1.add("E");
threadSafeList1.addAll(threadSafeList);
List mainList = new ArrayList();
mainList.addAll(Arrays.asList(threadSafeList1));
Iterator mainList1 = mainList.iterator();
while(mainList1.hasNext()){
System.out.printf("total : %s %n", mainList1.next());
}
}
}