in Technology by

What is the difference between ArrayList and Vector?

1 Answer

0 votes
by
No. ArrayList Vector
1) ArrayList is not synchronized. Vector is synchronized.
2) ArrayList is not a legacy class. Vector is a legacy class.
3) ArrayList increases its size by 50% of the array size. Vector increases its size by doubling the array size.
4) ArrayList is not ?thread-safe? as it is not synchronized. Vector list is ?thread-safe? as it?s every method is synchronized.

Related questions

0 votes
    What is the difference between the length of an Array and size of ArrayList in Java?...
asked May 27, 2021 in Technology by JackTerrance
0 votes
    What is the difference between ArrayList and LinkedList?...
asked May 26, 2021 in Technology by JackTerrance
0 votes
    What is the difference between length() and size() of ArrayList? (a) length() and size() return the ... Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    What is the difference between length() and size() of ArrayList? (a) length() and size() return ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    What is the difference between Array and ArrayList in JAVA?...
asked May 27, 2021 by JackTerrance
0 votes
    How to convert ArrayList to Array and Array to ArrayList in JAVA?...
asked May 27, 2021 in Technology by JackTerrance
0 votes
    The relation between vector potential and field strength is given by (a) Gradient (b) Divergence ... by,electromagnetic theory engineering physics,electromagnetic theory nptel...
asked Nov 11, 2021 in Education by JackTerrance
0 votes
    Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    I wish to retrieve my the elements inside Users that as a field of ArrayList and display each schedule ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    I am writing a program to optimize a transportation system. I have an ArrayList "passengers" of 65,000 ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 12, 2022 in Education by JackTerrance
0 votes
    I am writing a program to optimize a transportation system. I have an ArrayList "passengers" of 65,000 ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 10, 2022 in Education by JackTerrance
0 votes
    When two threads access the same ArrayList object what is the outcome of the program? (a) Both are able ... Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    What is the worst case complexity of accessing an element in ArrayList? (a) O(n) (b) O(1) (c) O( ... The Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these method can be used to increase the capacity of ArrayList object manually? (a) Capacity() ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these method of ArrayList class is used to obtain present size of an object? (a) size() ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
...