I am trying to store data from ArrayList to Strings until a symbol shows up. So for example, there is an ArrayList with the following Items:
{Start, at , - , Bob, amazing, gold, -, Peter, pan, Bright, shine, - , Sugar, shack -, lol, -}
I put random names for demonstration, but anywho I am trying to store data in a String until it sees a symbol. So For the above list, data will be stored in multiple strings in the following way:
String first = "Start at"
String second = "Bob amazing gold"
String third = "Peter pan bright shine"
String forth = "Sugar shack"
String fifth = "lol"
The above list is just an example. I am trying to implement a code that works with any list. So there is no pattern. The code should keep strong data to a String until it sees a symbol. Any ideas on how I can accomplish this? Please let me know!