I guess what is the purpose of using <?> as a parameter?
The purpose of <?> is to specify that you don't know what type of elements goes into the vector. And since you don't know what type of element goes into a vector, there is no way for you to add anything.
Does this mean I have to cast my vector to a specific type of vector before adding:
((Vector<Integer> ) v ).add(new Integer(1));
No.... If you cast, then you can break the collection -- meaning that you can add something into the collection that you shouldn't be adding into the collection. Bottom line... you can't add anything (besides null) into that collection, you can only iterate and use items of the collection.
Henry