Java: Swap elements in LinkedList class
Posted
by Algorist
on Stack Overflow
See other posts from Stack Overflow
or by Algorist
Published on 2010-05-15T08:21:37Z
Indexed on
2010/05/15
8:24 UTC
Read the original article
Hit count: 198
java
Hi,
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 method for linked list. Also, there is no way to add element at a specified position.
Thank you.
© Stack Overflow or respective owner