Which method of Deque is used to insert an element at the beginning and throws an exception if the deque is full?
Correct answer
addFirst()
Explanation
addFirst() throws IllegalStateException if the deque is full.
Update: Admin added a tag on this question
Topics
By Admin · · 28 views