🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Queues and Deques: all 13 questions

Quiz: Queues and Deques · Question 8 of 13

Which Java class is the recommended general-purpose queue and stack?

Which Java class is the recommended general-purpose queue and stack?

  1. A.Vector
  2. B.Stack
  3. C.ArrayDeque
  4. D.Hashtable
Answer & explanation

Correct answer: ArrayDeque

ArrayDeque is fast and supports both ends; Stack and Vector are old synchronised classes.

Can you get the rest right without peeking?

Take the timed Quiz: Queues and Deques quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →