Java tutorial
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { public static List stringsToList(String as[]) { Object obj; if (as == null || as.length == 0) { obj = null; } else { ArrayList arraylist = new ArrayList(); for (int i = 0; i < as.length; i++) arraylist.add(as[i]); obj = arraylist; } return ((List) (obj)); } }