public static String[] convertToStringArray(ArrayList<String> list) { String[] covertedArray = new String[list.size()]; covertedArray = (String[]) list.toArray(covertedArray); return covertedArray; }