Difference between add() and addElement() in Vector - Java

What is difference between add() and addElement() in Vector?

- The add() methods inserts an element at a given position of the vector.

- The addElement () method adds an object at the end of the vector and increases the size of the vector by one.
What is difference between sets and lists? - Java
Sets can have unique values. Lists can have duplicate values...
What is fail-fast iterator in Java? What is it used for?
The unsynchronized collections and their modifications, iterations are termed as ‘fail-fast’ iterators. An iterator that implements Iterable interface...
How to store and retrieve serialized objects to and from a file in Java?
The object’s current state can be persisted and retrieved by using the concept known as ‘serialization’. This is done on an object to a stream...
Post your comment