Important Collection classes:
List - Duplicate objects can be loaded
peek() - return and removed
poll() - return but does not removed
List - Duplicate objects can be loaded
- ArrayList implements List
- LinkedList implements List,Queue,Deque
- HashSet implements Set - (It does not guarantee the order of its elements)
- LinkedHashSet - (It ensures the order in which it is inserted)
- TreeSet implements NavigableSet - (Objects are stored in sorted, ascending order)
- PriorityQueue
- ArrayDeque - (It can be used as a stack)
peek() - return and removed
poll() - return but does not removed
No comments:
Post a Comment