A

Admin • 833.24K Points
Coach

Q. Which method of Deque is used to insert an element at the beginning and throws an exception if the deque is full?

  • (A) addFirst()
  • (B) offerFirst()
  • (C) putFirst()
  • (D) push()
  • Correct Answer - Option(A)
  • Views: 23
  • Filed under category Java
  • Hashtags: Java Deque

Explanation by: Admin

addFirst() throws IllegalStateException if the deque is full.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.