I happen not to give any thoughts about this but I have been doing this for quite a while in a project that I am working on.
public class Test {
public static void main(String[] args) {
List list = new ArrayList();
list.add(new DumbBean("A"));
list.add(new DumbBean("B"));
list.add(new DumbBean("C"));
System.out.println(list);
list.add(1, new DumbBean("D"));
System.out.println(list);
list.remove(2);
System.out.println(list);
}
}
It actually works in my case. I do a lot of insert/delete/add on a java arraylist.
I happen to think if I am overlooking something or is there a better alternative to this. (...another collection?)
Thanks