The Deque Interface in java

The Deque interface was added by Java SE 6. It extends Queue and declares the behavior of a double-ended queue. Double-ended queues can function as standard, first-in, first-out queues or as last-in, first-out stacks. Deque is a generic interface that has this declaration: Here, E specifies the type of objects that the deque will hold The Methods … Read more