Exam 1z0-809 All QuestionsBrowse all questions from this exam
Question 115

Given the code fragment:

What is the result?

    Correct Answer: C

    C

Discussion
Svetleto13Option: C

C,tested

steefaandOption: C

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.

Kim514Option: C

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);