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.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…