I want to maintain order of the elements being added in a list. So, I used a LinkedList
in Java.
Now I want to be able to swap two elements in the linked list. First of all, I cannot find an elementAt()
for LinkedList
. Also, there is no way to add element at a specified position.