Java Programming - Objects and Collections - Discussion

Discussion Forum : Objects and Collections - Pointing out the correct statements (Q.No. 8)
8.
Which statement is true for the class java.util.ArrayList?
The elements in the collection are ordered.
The collection is guaranteed to be immutable.
The elements in the collection are guaranteed to be unique.
The elements in the collection are accessed using a unique key.
Answer: Option
Explanation:

Yes, always the elements in the collection are ordered.

Discussion:
13 comments Page 2 of 2.

Harish said:   1 decade ago
ArrayList are meant for random access and they are not in ordered form.

Prakash VL said:   9 years ago
Wrong Answer!

ArrayList elements are indexed. :)

AAKASH KUMAR said:   9 years ago
How can be an element in the order of ArrayList?


Post your comments here:

Your comments will be displayed after verification.