1
JavaBeginner#collections
Queue supports FIFO operations (offer, poll, peek) at one end. Deque (double-ended queue) supports insertion and removal at both ends, and can be used as a Queue, Stack, or both.
Deque<Integer> stack = new ArrayDeque<>(); stack.push(1); stack.push(2); stack.pop(); // 2, LIFO behavior