A

Admin • 828.43K Points
Coach

Q. Which method in Deque is specifically designed to simulate stack's push operation?

  • (A) addFirst()
  • (B) offerFirst()
  • (C) push()
  • (D) enqueue()
  • Correct Answer - Option(C)
  • Views: 13
  • Filed under category Java
  • Hashtags: Java Deque

Explanation by: Admin
`push()` adds an element to the front of the deque, simulating stack behavior.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.