Forums Register Login

Array List

+Pie Number of slices to send: Send
Hello world,
I just wanted to know this. I have an array list of objects of the same class type. For example item details of a bill. Now i want to delete the 5th element(10elements are there). If I delete the 5th element what will happen to the element numbers of the array list. I mean the 6th element will it become the 5th element in the array list after deleting, the 5th element.
Hope you got what I mean.
Thanks
+Pie Number of slices to send: Send
You are correct. If you remove the fifth element, then the sixth element becomes the fifth element, the seventh becomes the sixth, etc. In addition, the size of the array becomes 9.
+Pie Number of slices to send: Send
Thanks for the reply. I just wanted to make sure what I had in my mind correct.
Your mind is under my control .... your will is now mine .... read this tiny ad
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 734 times.
Similar Threads
remove the element in list while iterating through it.
string and array
Filter on List - null elements - very interesting
Collections
Confused...
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 13:49:25.