A

Admin • 828.03K Points
Coach

Q. Which method removes the first element in a Deque and throws exception if empty?

  • (A) pollFirst()
  • (B) removeFirst()
  • (C) deleteFirst()
  • (D) pop()
  • Correct Answer - Option(B)
  • Views: 13
  • 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.