by ladyleo on November 25th, 2003

ladyleo

Question

Help answer this question below.

In Java programming, what is the difference between an array and a vector list?

Answers. 1 helpful answer below.

  • by Kirill Grouchnikov on May 19th, 2004

    Kirill Grouchnikov

    I suppose that the question refers to ArrayList and Vector classes of Java collections.
    The main difference is that Vector is synchronized and ArrayList is not. Apart from that - both grow and shrink as needed and allow amortized O(n) time for n insert/retrieve operations.

    If you are planning only single-thread access, you definitely should use ArrayList which is faster (because it is not synchronized)

    • Like
    • Report

    No comments. Post one | Permalink

Want to attach an image to your answer? Click here.

Did this answer your question? If not, then ask a new question or create a poll.

More Questions. Additional questions in this category.

You're reading In Java programming, what is the difference between an array and a vector list?

Follow us on Facebook!

Related Ads

ANSWERBAG BUZZ

Difference between array and list in java
Java difference between list and array
Java difference between array and list
Difference between list and array java
What is the difference between array and list in java
What is the difference between an array and a list in java
Difference between array and list java
Difference between lists and arrays java
Java array arraylist difference
Does jessica simpson have breast implants