What is the Vector class? - Core Java

What is the Vector class?

The capability of implementing a growable array of objects is provided by the class Vector.

A Vector class implements the dynamic array that can grow and shrink at run time (dynamically). It resembles the implementation of ArrayList with a difference that Vector is synchronized.

The Vector class implements an incremental array of objects.
The vector components can be accessed using an integer index.
The size of a Vector increases or decreases as needed to accommodate the items.

To reduce the amount of incremental reallocation, an application can increase the capacity of a vector before inserting a large number of components.

Each vector tries to optimize storage management by maintaining a capacity and a capacityIncrement. As components are added to a vector, the vector's storage increases in chunks the size of capacityIncrement.
What is the SimpleTimeZone class? - Core Java
What is the SimpleTimeZone class? - SimpleTimeZone is a concrete subclass of TimeZone class. The TimeZone class represents a time zone...
Purpose of the System class - Core Java
What is the purpose of the System class? - System class is provided with useful fields (static members) that are pertaining to the environment...
How are this() and super() used with constructors? - Core Java
How are this() and super() used with constructors? - this() constructor is invoked within a method of a class, if the execution of the constructor is to be done before the functionality of that method...
Post your comment