Computer Science, asked by Roshanf6371, 1 year ago

What are limitations of Array ?

Answers

Answered by shivam7048
1
\huge\bold\blue{Limitations\:of\:Array}
<b>
We know that we can use arrays whenever we have to store and manipulate collections of elements. However, the use of arrays for this purpose presents several limitations related to the way arrays are handled in Java:
</b><i>
➡ the dimension of an array is determined the moment the array is created, and cannot be changed later on;

➡the array occupies an amount of memory that is proportional to its size, independently of the number of elements that are actually of interest;

➡if we want to keep the elements of the collection ordered, and insert a new value in its correct position, or remove it, then, for each such operation we may need to move many elements (on the average, half of the elements of the array);

➡this is very inefficient
Similar questions