What is a queue in Java?
A queue is a data structure that allows elements to be accessed in any order, similar to a list.
You're partially correct! In a queue, elements are processed in a specific order: first in, first out (FIFO). Access is not arbitrary.
Can you explain why the FIFO principle is important in certain algorithms?