You can use arrays to store not only numbers, but also class instances.
Once you have defined the Movie
class, for example, you can use the
following statement to declare and initialize a Movie
array variable:
*-- Declare *-- Initialize v v --------------- -------------- Movie movies [] = new Movie [4];