Here you can find the source of createArrayList(String[] a)
public static ArrayList<String> createArrayList(String[] a)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; public class Main { public static ArrayList<String> createArrayList(String[] a) { ArrayList<String> b = new ArrayList<String>(); for (int i = 0; i < a.length; i++) { b.add(a[i]);//from ww w. ja v a2 s.co m } return b; } public static ArrayList<Integer> createArrayList(int[] a) { ArrayList<Integer> b = null; for (int i = 0; i < a.length; i++) { b.add(a[i]); } return b; } public static ArrayList<Float> createArrayList(float[] a) { ArrayList<Float> b = null; for (int i = 0; i < a.length; i++) { b.add(a[i]); } return b; } }