Set in Java | Set Methods, Example

A set in Java is an unordered collection of unique elements or objects. In other words, a set is a collection of elements that are not stored in a particular order. Elements are simply added to the set without any control over where they go. For example, in many applications, … Read more

LinkedList in Java | LinkedList Methods

Java LinkedList ➲ Java LinkedList is a linear data structure that uses a doubly linked list to store a group of elements. A doubly linked list consists of a group of nodes that together represents a sequence in the list. It stores the group of elements in the sequence of … Read more

Vector Programs in Java for Best Practice

In this tutorial, we have listed various types of Vector programs in Java for practice based on Vector methods, Enumeration, Iterator, and ListIterator. Before going to practice, I will recommend going to the previous vector tutorial for clear concepts. Java Vector Program based on Enumeration Let’s create a program where … Read more

Vector in Java | Vector Methods Example

Vector in Java Vector class in Java was introduced in JDK 1.0 version. It is present in Java.util package. It is a dynamically resizable array (growable array) which means it can grow or shrink as required. Java Vector class is similar to ArrayList class with two main differences. Vector is … Read more

How to Synchronize ArrayList in Java

In this tutorial, we will learn how to synchronize ArrayList in Java. Before going to understand this topic, first, we will understand in brief the meaning of synchronization. What is Synchronization in Java? Technically, Synchronization in java is the process of allowing only one thread at a time to complete … Read more