A

Admin • 828.03K Points
Coach

Q. Which of the following Deque methods are used for stack-like behavior?

  • (A) offerLast() and pollFirst()
  • (B) push() and pop()
  • (C) addLast() and removeLast()
  • (D) addFirst() and removeFirst()
  • Correct Answer - Option(B)
  • Views: 10
  • Filed under category Java
  • Hashtags: Java Deque

Explanation by: Admin
push() and pop() simulate LIFO (stack) behavior.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.