A

Admin • 833.24K Points
Coach

Q. Which method removes and returns the first element in Deque?

  • (A) pollLast()
  • (B) pollFirst()
  • (C) peekFirst()
  • (D) pop()
  • Correct Answer - Option(B)
  • Views: 28
  • Filed under category Java
  • Hashtags: Java Deque

Explanation by: Admin

pollFirst() removes and returns the first element or returns null if empty.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.