Vector Overview

Vector is very similar to ArrayList except that Vector is synchronized collection unlike ArrayList which is non-synchronized Features of Vector are as below Vector maintains insertion order Vector allows duplicate elements Vector is synchronized collection Since vector is synchronized, it takes performance hit and hence its not good to use in non-threaded environment Vector can […]

Share this article on

Size of LinkedList

Its very important to know the size of LinkedList as it is required in most of the times while coding We have size() method in LinkedList class which helps us to determine the size of LinkedList Size is the number of elements in that LinkedList public int size() Example : import java.util.*;   public class […]

Share this article on
< Previous Next >