A good answer might be:

An exception is thrown, and (ordinarily) the program halts.


isEmpty()

The elementAt(), removeElementAt(), and other methods will also throw an exception when the designated element does not exist. To check if a Vector has elements use

boolean isEmpty()

which returns true if the Vector has no elements.

QUESTION 14:

(Review: ) What algorithm is used to find the first occurrence of a particular element in an array?