How to Build a Dynamic Array By Using a Static Array in Java

Vindya Gunawardana
Aug 20, 2020 · 3 min read

We all know about the basic data structure, which is Array pretty well. And in java they are static. It means we have to allocate memory for the array ahead of time. The memory will define the number of elements that the array can hold. But what if we have know idea about the exact number of elements that we are going to insert before hand. Then the best thing is to have a dynamic…