Skip to content
Sharp

Collections · interview question

Why might ArrayDeque be preferred over Stack for LIFO operations?

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

Correct answer

B. ArrayDeque is part of the modern collections framework

Why

ArrayDeque is part of the Java Collections Framework and offers better performance since it isn't synchronized, unlike Stack. It provides a more complete and modern implementation of stack operations.

Test yourself on Collections

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

Start free test
All Collections questions →