A

Admin • 833.24K Points
Coach

Q. Which Deque method is equivalent to Stack’s peek()?

  • (A) peekLast()
  • (B) peekFirst()
  • (C) getLast()
  • (D) top()
  • Correct Answer - Option(B)
  • Views: 33
  • Filed under category Java
  • Hashtags: Java Deque

Explanation by: Admin

peekFirst() returns the element at the top of the stack (front of deque).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.