Java tutorial
//package com.java2s; import java.util.ArrayList; public class Main { /** * Returns the wanted configuration as int array. * * @param configs * @return */ public static int[] getConfigArray(ArrayList<int[]> configs) { int[] result = new int[configs.size() * 2]; int index = 0; for (int[] val : configs) { result[index++] = val[0]; result[index++] = val[1]; } return result; } }