Can you tell me the differences between Array and ArrayList?



Can you tell me the differences between Array and ArrayList?..

Answer / Abhishek Raghav

JavaScript does not have an ArrayList class like Java. However, if we compare JavaScript's array with Java's ArrayList:nn- JavaScript arrays are fixed in size and grow dynamically when needed. In contrast, ArrayList is resizable.n- JavaScript arrays can hold different data types (numbers, strings, objects, etc.) whereas Java's ArrayList stores only objects.n- JavaScript arrays have a faster access time for elements since they are stored contiguously in memory. In contrast, ArrayList has slower access times because it uses linked nodes.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

Define internal nodes?

1 Answers  


Construct a doubly linked list using a single pointer in each node?

1 Answers  


What is entryset method in map?

1 Answers  


Minimum number of queues needed to implement the priority queue?

1 Answers  


Does set allow null values?

1 Answers  


Which sort algorithm is best?

1 Answers  


What is a tech stack?

1 Answers  


How many types of sorting algorithms are there?

1 Answers  


In what order the elements of a hashset are retrieved?

1 Answers  


What is difference between hashmap and hashset?

1 Answers  


Why is hashing used?

1 Answers  


Can you sort a string?

1 Answers  


Categories