1Z0-804 · Question #37
Given: What is the result?
The correct answer is D. onetwothree. void addFirst(E e) Inserts the specified element at the front of this deque if it is possible to do so immediately without capacity restrictions. When using a capacity-restricted deque, it is generally preferable to use method offerFirst Retrieves and removes the last element…
Question
Given:
What is the result?
Exhibit
Options
- AAn exception is thrown at runtime on line 9.
- BAn exception is thrown at runtime on line 12
- Conetwonull
- Donetwothree
- Etwoonenull
- Fthreetwoone
How the community answered
(30 responses)- A3% (1)
- C7% (2)
- D77% (23)
- F13% (4)
Explanation
void addFirst(E e) Inserts the specified element at the front of this deque if it is possible to do so immediately without capacity restrictions. When using a capacity-restricted deque, it is generally preferable to use method offerFirst Retrieves and removes the last element of this deque, or returns null if this deque is empty. the tail of this deque, or null if this deque is empty
Topics
Community Discussion
No community discussion yet for this question.
