Which Deque method inserts an element at the tail without throwing exception?

  1. addLast()
  2. offerLast()
  3. push()
  4. putLast()
Correct answer offerLast()

Explanation

`offerLast()` returns false if the Deque is full, rather than throwing an exception.

Update: Admin added a tag on this question

Topics

By Admin · · 28 views