for example:
public static LinkedList ll = new LinkedList;
解决方案
from your question, I think (not 100% sure) you are looking for
java.util.LinkedHashMap
in your case, it would be LinkedHashMap
from java doc:
Hash table and linked list implementation of the Map interface, with
predictable iteration order. This implementation differs from HashMap
in that it maintains a doubly-linked list running through all of its
entries.
if you do want to get element by list.get(5), you could :
LinkedList>
so you can get Entry element by Entry entry = list.get(5), then entry.getKey() gives you the STring, and entry.getValue() gives you the Double.