A

Admin • 825.56K Points
Coach

Q. Which method retrieves, but does not remove, the first element of a Deque?

  • (A) pollFirst()
  • (B) element()
  • (C) peekFirst()
  • (D) getFirst()
  • Correct Answer - Option(C)
  • Views: 10
  • Filed under category Java
  • Hashtags: Java Deque

Explanation by: Admin
peekFirst() retrieves but does not remove the first element, returning null if empty.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.