Java tutorial
//package com.java2s; import java.util.List; import java.util.ArrayList; import java.util.Arrays; public class Main { public static List<String> makeList(String[] array) { List<String> result; if (array != null) { result = new ArrayList<String>(array.length); result.addAll(Arrays.asList(array)); } else { result = null; } return result; } }