cara menumpahkan string dengan koma di 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