Java Queue Part I

To Queue means ‘ to waiting in line’, which is very similar to queues in real life: a queue of people standing in an airport’s check-in gate; a queue of cars waiting for green light in a road in the city; a queue of customers waiting to be served in a bank’s counter, etc.

During the processing, the queue can be dynamically changed, i.e. processed elements are removed from the queue, and new elements are added to the queue.In the Java Collections Framework, Queue is the main interface, and there are four sub interfaces: Deque, BlockingDeque, BlockingQueue, and TransferQueue.Except the Deque interface which is in the java.util package, all others are organized in the java.util.concurrentpackage, which is designed for multi-threading or concurrent programming.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: