What does `pollFirst()` return if the Deque is empty?

  1. Throws exception
  2. null
  3. 0
  4. false
Correct answer null

Explanation

pollFirst() returns null if the Deque is empty.

Update: Admin added a tag on this question

Topics

By Admin · · 29 views