Home Segments Top Top Previous Next

521: Mainline

To read data from the movies array, once the data have been inserted, you simply write an expression containing the array name, a bracketed integer index, and the instance-variable name. The following expression, for example, yields the value assigned to the script instance variable of the Movie instance stored in the place indexed by the value assigned to the counter variable:

movies[counter].script