Differentiate between array list and vector in java.

devquora
devquora

Posted On: Feb 22, 2018

 

Following are some of the differences between array list and vectors in JAVA: –

  • An array list is not synchronized, whereas a vector is synchronized.
  • An array list works fast, whereas a vector does not.
  • There is an increase of 50% in the array size whenever any element is inserted inside the array list, whereas vector defaults to doubling the size of its array.
  • The increment size is not defined in an array list, whereas in vector it is defined.
  • Only iterators can be used in an array list for traversing an array, whereas vectors can use both enumeration and iterators for traversing an array.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Core Java Interview Questions

    Explain the significance of class loaders in Bootstrap?

    In order to load the Java Classes into a virtual environment, Classloader are used. A class loader will load key classe..

    Core Java Interview Questions

    What is the difference between JDK, JRE, and JVM?

    It is important to understand the difference between JDK, JRE, and JVM in Java.JVM (Java Virtual Machine) Java..

    Core Java Interview Questions

    What are the various access specifiers in Java?

    Access specifiers in java are the keywords which define the access scope of the function. It can be used before a class..