PPT Slide
- Vectors are a subclass of class Object.
- Thus, vectors can handle any class of object (i.e., no type checking)
- Thus, must cast any object obtained from a Vector before invoking any methods not defined in class Object.
Vector v = new Vector ( );
Student s = new Student( “Joe” );
otherStudent = (Student) v.elementAt(0);