A

Admin • 831.35K Points
Coach

Q. What exception is thrown if removeLast() is called on an empty Deque?

  • (A) NullPointerException
  • (B) IllegalStateException
  • (C) NoSuchElementException
  • (D) IllegalArgumentException
  • Correct Answer - Option(C)
  • Views: 36
  • Filed under category Java
  • Hashtags: Java Deque

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