What does `getLast()` do in a Deque?
Correct answer
Returns the last element without removing
Explanation
`getLast()` retrieves but does not remove the last element. Throws exception if empty.
Update: Admin added a tag on this question
Topics
By Admin · · 22 views