• Post Reply Bookmark Topic Watch Topic
  • New Topic

removing an object from an array  RSS feed

 
Carie Herrick
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 6 objects in my array which are filled with various data... I am tasked with "removing an object from an array by either shifting remaining objects to the start of the array, or putting the last object into the slot where the deleted object used to be." I know the index # of the array object that needs to be removed. After removed, I still have to call my array to look for the other objects.

Does this make sense to anyone and if so, any suggestions on how to attempt this?

Thanks!
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you have two proposed methods of removing the object from an array. Which one do you want to use? Pick one. Then try to implement it and when you find a problem show us your work and we can help you fix it.
 
Carie Herrick
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know which one to use because I don't know how to implement either one. After researching, I found just to set the array index to null. Hoping this will work...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66306
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Carie", please check your private messages for an important administrative matter.
 
Gamini Sirisena
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See if this helps.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!