Convert List To Array List - Android java.lang

Android examples for java.lang:array convert

Description

Convert List To Array List

Demo Code


//package com.java2s;
import java.util.ArrayList;
import java.util.List;

public class Main {
    public static <T> ArrayList<T> listToArrayList(List<T> list) {
        ArrayList<T> a = new ArrayList<T>();
        a.addAll(list);//from   w  w w.j  ava2  s  . co m
        return a;
    }
}

Related Tutorials