A

Admin • 828.03K Points
Coach

Q. What exception is thrown by getFirst() when the Deque is empty?

  • (A) IllegalStateException
  • (B) NullPointerException
  • (C) NoSuchElementException
  • (D) IndexOutOfBoundsException

Explanation by: Admin
getFirst() 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.