I want to get the index of a newly added element into an arraylist. e.g. 

```
List listA = new ArrayList();

// Lots of code adding and removing things from `listA`, imagine `listA` now 
// contains approx 10,000 records

listA.add("element 0");

```

How do I find out the index of the newly added item?

I think that perhaps, I need a different data structure, but cannot think of what to use.