问题详情

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

时间:2022-01-02 06:54 关键词: SCJP程序员认证考试

答案解析

C
相关问题