Skip to content
Sharp

Collections · interview question

Why does the difference between a Queue and a Deque in Java matter in practice?

Multiple choiceMediumchapter-4-curatedpremiumcollectionsqueue-and-deque-basics
Choose one answer
Answer and explanation

Correct answer

C. Deque allows insertion and removal at both ends.

Why

A Deque (double-ended queue) allows insertion and removal of elements at both ends, unlike a Queue which typically allows these operations at one end only.

Test yourself on Collections

A free test with instant, explained results. No account needed.

Start free test
All Collections questions →