I have a string that values are separated by commas, for example: "pizza,hamburguer,fries"
I need to iterate the String and add each value into a List, how can I do that? If there's a comma add the value into the list before the comma.
Thanks in advance,
String s = "pizza,hamburguer,fries";
ArrayList<String> list = new ArrayList();
list.add("pizza");
list.add("hamburuger");
list.add("fries");