Home TechnologyProgrammingJava Subscribe to RSS

What Is The Difference Between Vector And Arraylist In Java?

Answer Question

3 Answers - Sort by: Date | Rating

    Vector and ArrayList are very similar. Both of them represent a 'growable array', where you access to the elements in it through an index.

    ArrayList it's part of the Java Collection Framework, and has been added with version 1.2, while Vector it's an object that is present since the first version of the JDK. Vector, anyway, has been retrofitted to implement the List interface.

    The main difference is that Vector is a synchronized object, while ArrayList is not.
    1 0

    Sivakumar 

    answered 3 years ago

      1. Arraylist is not synchronized while vector is.
      2. Arraylist has no default size while vector has a default size of 10.
      3. We can specify the increment size with the vector and with array list we cannot.

      Thanks
      Samit Katiyar
      0 0
      Guest

      Guest 

      answered 6 months ago

        Vector is synchronized whereas ArrayList is not synchronized .....!
        0 0
        Guest

        Guest 

        answered 5 months ago

        More

           
           

          Ask a Question via Twitter

          Send a question to @askblurtit and we will publish it online and send you a reply everytime you receive an answer.

          Blurtit Store

          Get T-shirts, hoodies, caps and more at the Blurtit store

          Blurtit International