Package topics.introduction.examples
package topics.introduction.examples
Worked examples illustrating core Java data-structure APIs.
Each class in this package demonstrates one Java Collections Framework type, showing its construction, common operations, and typical use-cases — making them useful as quick reference snippets.
Classes in This Package
ArrayDequeExample— double-ended queue as stack/queueArrayListExample— resizable array listHashSetExample— unordered set with O(1) lookupLinkedHashSetExample— insertion-ordered setLinkedListExample— doubly linked listPriorityQueueExample— min-heap priority queueStackExample— LIFO stackTreeSetExample— sorted set (red-black tree)VectorExample— legacy thread-safe list
-
ClassesClassDescriptionDemonstrates basic
ArrayListoperations: add, remove, and iteration.DemonstratesHashSetoperations: add, remove, and contains.DemonstratesLinkedHashSetoperations.DemonstratesLinkedListas a doubly-linked list with operations at both ends: addFirst, addLast, removeFirst, and removeLast.DemonstratesPriorityQueuewith natural ordering.DemonstratesTreeSetwith natural sorted ordering.Demonstrates the legacy thread-safeVectorcollection.