A

Admin • 828.03K Points
Coach

Q. Which method removes the element at the front without throwing exception?

  • (A) pollFirst()
  • (B) removeFirst()
  • (C) pop()
  • (D) getFirst()
  • Correct Answer - Option(A)
  • Views: 14
  • Filed under category Java
  • Hashtags: Java Deque

Explanation by: Admin
`pollFirst()` removes and returns head or returns null if deque is empty.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.