Which of the following is true for ArrayDeque?

  1. Allows null elements
  2. Thread-safe
  3. Does not allow null elements
  4. Maintains natural order
Correct answer Does not allow null elements

Explanation

ArrayDeque does not allow null elements to avoid ambiguity with poll() and peek().

Update: Admin added a tag on this question

Topics

By Admin · · 25 views