I cant use loops like for/while. forEach is okay.
I have a list like this:
List<String> listStrings = new ArrayList<String>();
listStrings.add("12 14 15");
listStrings.add("15 13 17");
listStrings.add("14 15 13");
How do I split each String with .split() in this list at the " " without using for/while loops?
How the new List newList is supposed to look like:
List<String> newList {"12", "14, "15", "15", ...}
("Why cant you use loops like for/while"-> its for a task and I have to practise using streams.)
Thank´s in advance.