For (String sport: olympicSports){

for (String sport: olympicSports) {
whats the first line going to do is it a loop

Yes, its a loop. It will loop through olympicSports which i assume is an array

in each iteration of the loop, the value in array will be stored in String sport (sport variable of type string), so we can do something with the value from the list, in this case print it

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.