4

So i'm working on this course assignment program and i'm trying to remove object from a 2d array and I couldn't figure it out how to do it without messing the array indexes. Wen I was using aarrayList I could just do arrayName.remove(number), but not with the regular array. Than I had an enlightment moment.
Why not just move the object off the screen?

Comments
  • 0
    Convert to an ArrayList, remove the element, convert to an array. Problem solved. I'm sure whoever grades it will love you.
Add Comment