A

Admin • 831K Points
Coach

Q. Which Java class is best for LIFO and FIFO both using same interface?

  • (A) LinkedList
  • (B) ArrayDeque
  • (C) HashSet
  • (D) PriorityQueue
  • Correct Answer - Option(B)
  • Views: 11
  • Filed under category Java
  • Hashtags: Java Deque

Explanation by: Admin
`ArrayDeque` can be used as both a stack and a queue (LIFO & FIFO).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.