Check out example codes for "java length of vector". It will help you in understanding the concepts better.

Code Example 1

import java.util.*;
class sizeaf
{
  public static void main(String args[])
  {
    Vector v = new Vector();
    v.add(1);
    v.add(2);
    v.add(3);
    v.add(4);
    System.out.println("Size : "+v.size());
  }
}

Code Example 2

Vector.size()

Learn ReactJs, React Native from akashmittal.com