Here you can find the source of convertArrayToList(String[] array)
Parameter | Description |
---|---|
array | a parameter |
public static ArrayList<String> convertArrayToList(String[] array)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; public class Main { /**/*from w ww . j a va 2s . com*/ * Convert array to list of objects. * * @param array * @return */ public static ArrayList<String> convertArrayToList(String[] array) { ArrayList<String> elemList = new ArrayList<String>(); for (String element : array) { elemList.add(element); } return elemList; } }