Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: LGPL 

import java.util.ArrayList;

public class Main {
    public static <T> ArrayList<T> convertPrimitiveArrayToList(T[] data) {

        ArrayList<T> ret = new ArrayList<T>();

        for (int i = 0; i < data.length; i++) {
            ret.add(data[i]);
        }

        return ret;
    }
}