Only institute to provide recording daily after class to students. Only institute you can practice whole day under faculty guidance. Only institute where test and mockup tests are taken regularly. Only institute provides all mobile nos of old students on website.

Java Vector

Introduction of Java Vector

Vector is a legacy class that represents a dynamic array. This class existed before Collection framework and is modified after the introduction of Collection framework to make a compatible to the Collection framework.

Commonly used methods of Vector

1.addElement(): It is used to add an element to a Vector.
Java By Kiran

2.removeElement():It is used to remove element from Vector.
Java By Kiran

3.capacity():It returns the capacity of a Vector.
Java By Kiran

4.ensureCapacity(): It is used to increase the capacity of a Vector.
Java By Kiran

5.elements(): It is used to obtain Enumeration for traversing the Vector elements.
Java By Kiran

Enumeration Interface

Enumeration is legacy interface that is used by collection to facilitate traversing there objects in implementation independent manner.

Methods of Enumeration Interface

1.hasMoreElements(): It is used to find out whether an element is collection or not.
Java By Kiran

2.nextElement(): It is used to obtain reference of next element of an collection.
Java By Kiran

Example Of Vector

Employee.java

Java By Kiran

VectorDemo.java

Java By Kiran

Output

Java By Kiran