Android String Array to List Convert stringsToList(String[] items)

Here you can find the source of stringsToList(String[] items)

Description

convert string array to array list

Parameter

Parameter Description
items a parameter

Declaration

public static List<String> stringsToList(String[] items) 

Method Source Code

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

public class Main {
    /**/*from w ww .j av a  2 s . c  o m*/
     * convert string array to array list
     * @param items
     * @return
     */
    public static List<String> stringsToList(String[] items) {
        List<String> list = new ArrayList<String>();
        for (int i = 0; i < items.length; i++) {
            list.add(items[i]);
        }
        return list;
    }
}