Question
Which statement about ArrayDeque as a Queue is the strongest interview answer?
- ArrayDeque as a Queue is mostly a naming style choice and has little effect on runtime or design.
- ArrayDeque is an efficient general-purpose deque that can model a queue by adding at one end and removing from the other.
- ArrayDeque as a Queue exists mainly to reduce the number of Java files in a project.
- ArrayDeque as a Queue matters only for frontend frameworks, not for core Java applications.
Hint
Start with the core rule behind ArrayDeque as a Queue.
Answer and rationale
Correct answer: B. ArrayDeque is an efficient general-purpose deque that can model a queue by adding at one end and removing from the other.
ArrayDeque is an efficient general-purpose deque that can model a queue by adding at one end and removing from the other. This is the base concept interviewers commonly test first.
Track: Java