An array is a sequential list?

-3

I understand that there are two types of lists: linked and sequential. In the case of the linked in java we have the class java.util.LinkedList but in the case of the sequential lists I have not found any type of class. I think that an array is an example of a sequential list but I'm not clear about it. Could someone clarify these concepts?

    
asked by UnaiLopez 04.02.2018 в 19:51
source

2 answers

1

There are 2 types of lists: direct access and sequential access. The shortcut or random access is when you access an item in the list directly or randomly. Sequential Access means that you must access the elements of that list in sequential order.

In the case of Java, these lists are implemented in java.util.LinkedList and java.util.ArrayList . LinkedList is a double linked list, and to access its elements you must do it sequentially. ArrayList uses a fixed size array, and resizes it when necessary, and access to its elements is direct.

    
answered by 05.02.2018 / 02:41
source
0

Arrays in Java are a sequential set of memory accessed through a position index. The length of an Array in Java has fixed length while the Lists (List) its length is variable.

Java arrays are objects, so they have properties and methods to manipulate them.

    
answered by 04.02.2018 в 19:57