C is correct, but it would be printed in new lines. pop and remove both remove from start of queue and print what was removed and after tat queue is printed.
Answer is C:
Deque<String> queue = new ArrayDeque<>();
queue.add("Susan");
queue.add("Allen");
queue.add("David");
System.out.println(queue.pop());
System.out.println(queue.remove());
System.out.println(queue);
upvoted 1 times
...
This section is not available anymore. Please use the main Exam Page.1z0-809 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Svetleto13
Highly Voted 3 years, 8 months agosteefaand
Most Recent 11 months, 1 week agoKim514
1 year, 9 months ago