Given
1 import java.util.*;
2. public class PQ {
public static void main(String[args) {
PriorityQueue<String>pq = new Priority Queue<String>():
5. pq.add("carrot")
6. pq.add("apple");
7. pq.add("banana"):
8. System.out.println(pq.poll() + "." + pq.peek());
9.
}
10.}
What is the result?
Select one
a. apple apple
b. carrot:apple
Activa
c. apple banana
d. banana apple
Answers
Answered by
0
Answer:
a. apple apple
Explanation:
Similar questions