A

Admin • 830.13K 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()

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.