Given a class whose instances, when found in a collection of objects, are sorted by using the compareTo()method, which two statements are true?() 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.
Given a class whose instances, when found in a collection of objects, are sorted by using the compareTo()method, which two statements are true?()
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.
相关考题:
It has been over a century _______ the railway was completed. (A)when(B) once(C) which(D) since
在Java语言中,包pack1的类class1中有成员方法:protectedvoidmethod_1(){…},privatevoidmethod_2(){…},publicvoidmethod_3(){…}和voidmethod_4(){…},在包pack2中的类class2不是class1的子类,你在class2中可以调用方法()。 A.method_1B.method_2C.method_3D.method_4
包pack1的类class1中有成员方法:protectedvoidmethod_1(){…},privatevoidmethod_2(){…},publicvoidmethod_3(){…}和voidmethod_4(){…},在包pack2中的类class2是class1的子类,你在class2中可以调用方法()。 A.method_1B.method_2C.method_3D.method_4
包pack1的类c_ass1中有成员方法:protectedvoidmethod_1(){…},privatevoidmethod_2(){…},publicvoidmethod_3(){…}和voidmethod_4(){…},在包pack2中的类class2是class1的子类,它在class2中可以调用方法()。 A.method_1B.method_2C.method_3D.method_4
下列CASE语句中执行结果不为空的是() A、SELECTCASEWHEN125THEN'true'ELSE'false'END;B、SELECTCASEBINARY'B'WHEN'a'THEN1WHEN'b'THEN2END;C、SELECTCASEWHEN-10THEN'true'END;D、SELECTCASE'one'WHEN1THEN'one'WHEN2THEN'two'END;
The beautiful mountain village__________ we spent our holiday last year is locatedin __________ is now part of Guangxi.A.which ; whereB.where; whatC.that ; whatD.when ; which
Java的容器中重要的接口java.util.Collection定义了许多方法。下面的选项中哪个方法不是Collection接口所定义的?()A.int size()B.boolean containsAll(Collection c)C.compareTo(Object obj)D.boolean remove(Object obj)
2、Java的集合框架中重要的接口java.util.Collection定义了许多方法。下列不是Collection接口所定义的的方法是()。A.int size()B.boolean containsAll(Collection c)C.compareTo(Object obj)D.boolean remove(Object obj)