java.lang.classcastexception: java.lang.string cannot be cast to java.util.arraylist
// It sounds like you are trying to cast a String array to ArrayList.
// (ArrayList)StringArray[] would not work.
// Try the following code instead.
ArrayList<String> test1 = new ArrayList(Arrays.asList(StringArray));