试题详情
单项选择题 import java.util.*;  public class PQ {  public static void main(String[] args) {  PriorityQueue pq = new PriorityQueue();  pq.add(”carrot”); pq.add(”apple”);  pq.add(”banana”);  System.out.println(pq.poll() +”:” + pq.peek()); }  }  What is the result?() 

A、 apple:apple

B、 carrot:apple

C、 apple:banana

D、 banana:apple

E、 carrot:carrot

F、 carrot:banana

  • C
  • 关注下方微信公众号,在线模考后查看

热门试题