Here you can find the source of arrayToArrayList(Object[] myArray)
Parameter | Description |
---|---|
myArray | a parameter |
static public ArrayList arrayToArrayList(Object[] myArray)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; public class Main { /**/*from w w w . j av a 2s .c o m*/ * This method converts an array into an ArrayList. * * @param myArray * @return */ static public ArrayList arrayToArrayList(Object[] myArray) { int i = 0; ArrayList out = new ArrayList(); for (i = 0; i < myArray.length; i++) { Object extract = myArray[i]; out.add(extract); } return (out); } }