What is the result?

Given:

What is the result?

Given:

What is the result?

A.
An exception is thrown at runtime on line 9.

B.
An exception is thrown at runtime on line 12

C.
onetwonull

D.
onetwothree

E.
twoonenull

F.
threetwoone

Explanation:

addFirst
void addFirst(E e)
Inserts the specified element at the front of this deque if it is possible to do so immediately without
violating
capacity restrictions. When using a capacity-restricted deque, it is generally preferable to use
method offerFirst
(E).
pollLast
E pollLast()
Retrieves and removes the last element of this deque, or returns null if this deque is empty.
Returns:

the tail of this deque, or null if this deque is empty



Leave a Reply 1

Your email address will not be published. Required fields are marked *