Android ArrayList to Array Convert arrayListToArray(ArrayList input)

Here you can find the source of arrayListToArray(ArrayList input)

Description

array List To Array

License

Open Source License

Declaration

public static String[] arrayListToArray(ArrayList<String> input) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;

public class Main {
    public static String[] arrayListToArray(ArrayList<String> input) {
        String[] returnedArray = new String[input.size()];
        for (int i = 0; i < input.size(); i++) {
            returnedArray[i] = input.get(i);
        }/*  w  ww .  jav  a 2s  .c  o  m*/
        return returnedArray;
    }
}