To add elements to the back end of a vector, you use the addElement
method. For example, if a Movie
instance is assigned to a variable
m
, you add that movie instance to a vector assigned to v
as
follows:
*-- A vector | *-- A movie instance | | v v v.addElement(m)