is there anything similar to .Net's
LinkedListNode)>)..::.Next and LinkedListNode)>)..::.Previous properties in Java's java.util.LinkedList.
解决方案
Use the List interface's listIterator() method to get a ListIterator object. From there you can use the hasNext(), next(), hasPrevious(), and previous() methods to navigate the list. Here's a very simple example using ListIterator.
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
...
List myList = new LinkedList();
myList.add("A");
myList.add("B");
myList.add("C");
...
ListIterator it = myList.listIterator();
if (it.hasNext()) {
String s1 = it.next();
System.out.println(s1);
}
The example code should print "A".