For example : A list
A B C D E
Given C , Switch to
C A B D E
Notice that the array size will change, some items may removed in run times
Do this:
ArraylistObj.remove(object);
ArrayListObj.add(position, Object);
As per your code use this :
url.remove("C"); url.add(0,"C");