+ 1
I'm trying to split an array. Any ideas what could be an effective way to do it?
How can I split the teams and be able to select them individually by using their index on the on the array? Example: Manchester United Arsenal Orlando Pirates Manchester City... Please see the below code! https://code.sololearn.com/cC4sYmFxAIQ3/?ref=app
6 ответов
+ 11
Change your last line to
for (String s: matches)
System.out.println(s);
+ 8
As for the second code... you can't use the enhanced for loop over a String (games must be replaced by a collection to use enhanced for loop).
+ 7
You're welcome :D
+ 2
"Change your last line to
for (String s: matches)
System.out.println(s);"
YOU MADE MY DAY, THANK YOU.
+ 1
I also tried the code below:
https://code.sololearn.com/crfTQ9Vr6N1I/?ref=app
0
yes it did. thanks for your contribution though