What is the result of calling `pop()` on an empty Deque?

  1. null
  2. 0
  3. NoSuchElementException
  4. IllegalArgumentException
Correct answer NoSuchElementException

Explanation

pop() throws NoSuchElementException if the Deque is empty.

Update: Admin added a tag on this question

Topics

By Admin · · 39 views