简体   繁体   中英

What concrete data type implements abstract data type structure in Java?

Because a queue is an abstract data type data structure, what concrete data type structure implements it? I saw that a queue is an interface so was unsure how a concrete data type could implement the abstract data type structure.

Read the Javadoc for Queue . Notice the seventh line from the top:

All Known Implementing Classes:

There you will find a list of implementations bundled with any implementation of Java.

AbstractQueue, ArrayBlockingQueue, ArrayDeque, ConcurrentLinkedDeque, ConcurrentLinkedQueue, DelayQueue, LinkedBlockingDeque, LinkedBlockingQueue, LinkedList, LinkedTransferQueue, PriorityBlockingQueue, PriorityQueue, SynchronousQueue

Third-parties offer implementations as well. For example, Google Guava has implementations such as EvictingQueue . And Apache Commons offers implementations such as CircularFifoQueue .

And you can make your own implementation if need be.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM