在 Java 集合中,哪个集合不允许重复,哪个还保留数据的插入顺序?
最佳答案
LinkedHashSet
This implementation differs from HashSet in that it maintains a doubly-linked list running through all of its entries. This linked list defines the iteration ordering, which is the order in which elements were inserted into the set (insertion-order)
关于java - 将保持插入顺序且没有重复的集合,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16480529/