Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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;
    }
}