import structure.*; /** Little program to illustrate that Vectors are polymorphic; they can store * multiple types of Objects, and with autoboxing, that includes primitive * types as well. */ public class PolyVect { public static void main(String[] args){ Vector myVect = new Vector(); myVect.add(1); myVect.add("Kirby was here"); myVect.add(new Vector()); myVect.add(new int[20]); for (int i=0; i < myVect.size(); i++){ Association vectObject = (Association)myVect.get(i); System.out.println(vectObject.toString()); } } }