[Solved] converting String to string array


Try this:

String category = "1-4-5-10-13-27-28-29-32-34-35-36-51-58-150";
String [] categoryArray = category.split("-");

Then if you want to end up with an ArrayList<String> do:

List<String> categoryArrayList = new ArrayList<String>();
Collections.addAll(categoryArrayList, categoryArray);

solved converting String to string array