A good answer might be:1 2 4 -1 | |
Enumeration
It is very common for a program to access the elements of a Once you have anelements() // Returns an enumeration of the components of the vector. enumeration object, the hasMoreElements()
and the nextElement() methods are used to move through the elements:
Here is a program that prints out every element in theboolean hasMoreElements() // return true if not all elements have been visited Object nextElement() // Returns the next element of the enumeration. Vector:
Unfortunately, the program is full of blanks. | |
QUESTION 17:Fill the blanks by choosing from the above methods. Click Here after you have answered the question |