PrepZone Logo
PrepZone
Back to Java

Java · Easy

Why is Deque preferred over Stack in Java? What implementations does Deque have?

JavaCollections

Answer preview

Deque (double-ended queue) is the modern replacement for the legacy Stack class. Stack extends Vector and is considered obsolete.…