![]() As the name suggests, dynamic arrays have a dynamic size modifiable at runtime. ArrayList data structure is used to implement the concept of dynamic data structures in Java. In order to mitigate the sizing problem of the array, dynamic arrays came into the picture. This not just wastes time, but also wastes a lot of memory. In this scenario, we have to create a new array with a bigger size and copy the elements of the previous array to the newly created array. This causes a menace when we want to add elements beyond its initial size at runtime. Arrays have a fixed size and it has to be specified at the time of creation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |