A

Admin • 828.43K Points
Coach

Q. What does `removeLast()` return when the deque is empty?

  • (A) null
  • (B) false
  • (C) 0
  • (D) Throws exception
  • Correct Answer - Option(D)
  • Views: 13
  • Filed under category Java
  • Hashtags: Java Deque

Explanation by: Admin
`removeLast()` throws NoSuchElementException when the deque is empty.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.