Hi, I loop the teams from a website and get the result(example) are: Manchester United - Arsenal  Orlando Pirates - Manchester | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Hi, I loop the teams from a website and get the result(example) are: Manchester United - Arsenal  Orlando Pirates - Manchester

Then I want to select the teams individually like: Manchester United Arsenal Orlando Pirates... I decided to use split to add them on an Array so I can use their index number to select them. I get the first team and last team correctly but the teams in between I get something like : println(choose_team[3]); Team Foxtrot Team Golf  but I want them individually. Please see the code! Any solutions? https://code.sololearn.com/cmzU54YoiwVj/?ref=app

20th Sep 2017, 12:48 PM
Sibusiso Mbambo
4 Answers
+ 3
https://code.sololearn.com/clvMqmc80RmM/#java ^I'm not sure if that's what you're asking, but I changed your code a little. Let me know if that's what you were asking.
20th Sep 2017, 1:22 PM
AgentSmith
0
Here is the end results I want at the end: Manchester United - Arsenal Orlando Pirates - Manchester City Kaizer Chiefs - West Ham United Sundowns - Supersport United OR Manchester United Arsenal Orlando Pirates Manchester City Kaizer Chiefs West Ham United Sundowns Supersport United
20th Sep 2017, 1:37 PM
Sibusiso Mbambo
0
Thank you
20th Sep 2017, 1:37 PM
Sibusiso Mbambo
0
//Is there a way to choose INDEX 3 for axample which is West Ham United Sundowns (West Ham United vs Sundowns) and separate them? Maybe convert them to String and split them by \\s and find each team INDEX.
20th Sep 2017, 1:59 PM
Sibusiso Mbambo