Queue là collection FIFO (First-In-First-Out) với các thao tác: offer(E) (enqueue), poll() (dequeue, trả null nếu rỗng), peek() (xem phần tử đầu không xóa).
- Implementations:
LinkedList,PriorityQueue,ArrayDeque. - Dùng khi: lập lịch task, xử lý message, BFS graph traversal, load balancing.
PriorityQueuesắp xếp theo độ ưu tiên;Dequecho phép truy cập cả hai đầu.