Check your inner loop. For starters why is it looping numTheaters times? What if the numTheaters was 10 but the first theater only had 2 movies, it would try and loop 8 more times.
Type: Posts; User: Junky
Check your inner loop. For starters why is it looping numTheaters times? What if the numTheaters was 10 but the first theater only had 2 movies, it would try and loop 8 more times.
No you would need to nest the loops inside each other.
for each theatre {
get list of movies
for each movie {
do something
}
}
You have one loop iterating over the theaterObject array. What about the movieList array?