问答题
DRAG DROP Click the Task button.
Given: Which code, inserted at line 4, guarantees that this program will output [1, 2]()?
A.Set set = new TreeSet(); B.Set set = new HashSet(); C.Set set = new SortedSet(); D.List set = new SortedList(); E.Set set = new LinkedHashSet();
A.The class implements java.lang.Comparable. B.The class implements java.util.Comparator. C.The interface used to implement sorting allows this class to define only one sort sequence. D.The interface used to implement sorting allows this class to define many different sort sequences.
微信扫一扫,加关注免费搜题