// The Beatles program from the book, page 405 // implemented with the Vector class (instead of // ArrayList class). import java.util.Vector; class Beatles { public static void main (String[] args) { Vector band = new Vector (); band.addElement ("Paul"); band.addElement ("Pete"); band.addElement ("John"); band.addElement ("George"); System.out.println (band); band.removeElement ("Pete"); System.out.println (band); band.insertElementAt ("Ringo", 2); System.out.println (band); System.out.println ("Size of the band: " + band.size()); } }