A

Admin • 828.03K Points
Coach

Q. Which method is used to retrieve and remove the first element, blocking if necessary?

  • (A) takeFirst()
  • (B) pollFirst()
  • (C) peekFirst()
  • (D) removeFirst()

Explanation by: Admin
`takeFirst()` is a blocking method that waits if the deque is empty.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.