The Comparable interface is a functional interface that contains one method that takes one parameter. Which of the below
Posted: Sat May 14, 2022 8:13 pm
The Comparable interface is a functional interface that contains
one method that takes one parameter. Which of the below is true
regarding how a class implements that one method? Choose ALL that
apply.
A. The method is expected to return a negative number if that
instance should be ordered after the parameter.
B. It should return a positive number if that object should be
ordered after the parameter
C. It should return a zero if that instance is equal to the
parameter
D. It should return the String value "less" if it should be
ordered before the parameter
one method that takes one parameter. Which of the below is true
regarding how a class implements that one method? Choose ALL that
apply.
A. The method is expected to return a negative number if that
instance should be ordered after the parameter.
B. It should return a positive number if that object should be
ordered after the parameter
C. It should return a zero if that instance is equal to the
parameter
D. It should return the String value "less" if it should be
ordered before the parameter