40

Possible Duplicate:
Primitive Array vs ArrayList

What is the difference between List and Array in Java? Or the difference between Array and Vector!

2
  • 3
    stackoverflow.com/questions/7869212/… - arrays are primitives, List is an interface which defines a set of operations on sequential containers, and Vector implements List. Unless you meant ArrayList, and not Array. Commented May 7, 2012 at 18:27
  • 2
    you should read their documentation before posting a question: interface List, class ArrayList and class Vector Commented May 7, 2012 at 18:27

1 Answer 1

72

In general (and in Java) an array is a data structure consisting of sequential memory storing a collection of objects.

List is an interface in Java, which means that it may have multiple implementations. One of these implementations is ArrayList, which is a class that implements the behavior of the List interface using arrays as the data structure.

There are a number of other classes that implement the List interface. One easy way to take a look at them is by viewing the Javadoc for List. On this page, you'll see "all known implementing classes," which are all of the kinds of lists in Java.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.