Use an ArrayDeque as both a stack (LIFO) and a queue (FIFO).
Type it from memory — say each line out loud as you write it. Then check.
Use an ArrayDeque as both a stack (LIFO) and a queue (FIFO).
Type it from memory — say each line out loud as you write it. Then check.