ArrayList Tip - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: Java Programming (https://www.supportforums.net/forumdisplay.php?fid=22) +---- Thread: ArrayList Tip (/showthread.php?tid=4111) |
ArrayList Tip - Project Evolution - 01-01-2010 When using an ArrayList that accepts integer objects like so, Code: ArrayList<Integer> list = new ArrayList<Integer>(); Basically we have, Code: ArrayList<Integer> list = new ArrayList<Integer>(); Code: list.remove((Integer) 2); Code: list.remove(2); If it removes what is at index 2, it will remove the number 3 because always remember, Arrays start at 0 not 1! Thanks. RE: ArrayList Tip - Qkyrie - 01-09-2010 ahh, nice one, never thought of that. That's something to remember, weird that I haven't stumbled upon this before.. thanks Q RE: ArrayList Tip - Ⱳąŗɗ - 03-13-2010 I see tyvm, I'll keep this in mind when using integer Arrays. |