A

Admin • 833.24K Points
Coach

Q. Which method in Deque throws exception when removing from an empty deque?

  • (A) pollFirst()
  • (B) removeFirst()
  • (C) peekFirst()
  • (D) offerFirst()
  • Correct Answer - Option(B)
  • Views: 30
  • Filed under category Java
  • Hashtags: Java Deque

Explanation by: Admin

`removeFirst()` throws NoSuchElementException if the deque is empty.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.