How to convert a nested list into a single list in java?
List list = new ArrayList();
List newList = new ArrayList();
List<Integer> list1 = new ArrayList<Integer>();
list1.add(2);
list1.add(4);
list.add(5);
list.addAll(list1);
list.add(6);
How can i add the elements of list to newList so that when i print newList
it prints
[5,2,4,6]
> nestedList;`
– Floegipoky Oct 01 '14 at 16:53