Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

import java.util.ArrayList;
import java.util.Arrays;

import java.util.List;

public class Main {
    public static <T> ArrayList<T> toArrayList(Object[] arr) {
        List list = toList(arr);
        ArrayList<T> arrayList = new ArrayList<T>();
        arrayList.addAll(list);
        return arrayList;
    }

    public static List toList(Object[] arr) {
        List list = Arrays.asList(arr);
        return list;
    }
}