Computer scienceProgramming languagesJavaWorking with dataCollectionsCollection implementationsThe Collection hierarchy implementations

Stack

Match methods

Report a typo

The interface java.util.Deque<E> has a lot of useful methods.

There are two important groups of methods:

  • methods that throw exceptions (left);
  • methods that return special values (right).

Match methods with the same purpose.

Match the items from left and right columns
addFirst
removeFirst
getFirst
addLast
removeLast
getLast
peekFirst
offerLast
peekLast
offerFirst
pollLast
pollFirst

Create a free account to access the full topic