Jak rozlać sznur z przecinkiem w Jaav
String str = "dog, cat, bear, elephant, ..., giraffe";
List<String> elephantList = Arrays.asList(str.split(","));
//If you want to additionally get rid of whitespaces around items:
String[] elephantList = str.split("\\s*,\\s*");
Itchy Ibex