I have a double ArrayList
in java like this.
List values = new ArrayList(2);
Now what I want t
@Ahamed has a point, but if you're insisting on using lists so you can have three arraylist like this:
ArrayList first = new ArrayList(Arrays.AsList(100,100,100,100,100));
ArrayList second = new ArrayList(Arrays.AsList(50,35,25,45,65));
ArrayList third = new ArrayList();
for(int i = 0; i < first.size(); i++) {
third.add(first.get(i));
third.add(second.get(i));
}
Edit: If you have those values on your list that below:
List values = new ArrayList(2);
what you want to do is combine them, right? You can try something like this: (I assume that both array are same sized, otherwise you need to use two for statement)
ArrayList yourArray = new ArrayList();
for(int i = 0; i < values.get(0).length; i++) {
yourArray.add(values.get(0)[i]);
yourArray.add(values.get(1)[i]);
}