A

Admin • 828.03K Points
Coach

Q. Which of the following can be used as both stack and queue?

  • (A) ArrayList
  • (B) Deque
  • (C) PriorityQueue
  • (D) Set
  • Correct Answer - Option(B)
  • Views: 13
  • Filed under category Java
  • Hashtags: Java Queue

Explanation by: Admin
`Deque` can behave as both a queue (FIFO) and a stack (LIFO).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.