-5

What is the difference between the two in Java? Is it just that blocking deque uses an array and linked blocking deque uses a linked list? I want to know this so that I can make a decision about which data structure I want to use for my audio track queue.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Prithvidiamond
  • 327
  • 2
  • 15

1 Answers1

4

java.util.concurrent.BlockingDeque is an interface, and java.util.concurrent.LinkedBlockingDeque is a concrete class implementing that interface. In fact, it is the only (public) implementation of BlockingDeque in the JavaSE API, so there is no choice to make (unless you want to implement your own or find another library implementing another BlockingDeque).

See also What does it mean to program to an interface?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197