0

Can we change the size of an array?

8th Jul 2017, 12:19 AM
Hassam Usmani
Hassam Usmani - avatar
1 Antwort
+ 5
Arrays are immutable. You would have to create a new array of larger (or smaller) size. Then you could copy the wanted values over from the old array to the new array.
8th Jul 2017, 12:41 AM
Rrestoring faith
Rrestoring faith - avatar