+ 2
How to access the deleted element of an array?
for example if we have an array [Ahmad,Alex,John] if I delete the first element so how I can again access to first element?
3 Réponses
+ 3
One thing to note in your mind if you creat array like your example than you are not able to delete those elements from array yes you have another way to replace array value 0 or somthing but once you creat static array then you are not able to delete those array elememts.
+ 3
You cannot delete an element by from an array, you can only overwrite it with a different value or null, if it is not an array of primitives. But because arrays are not resizable, you will always have an access to the first value calling arrayName[0] even if it's null.