Question: Consider the Java statement: int comparison = object 1 . compareTo ( object 2 ) ; where object 1 and object 2 both implement the
Consider the Java statement:
int comparison objectcompareToobject;
where object and object both implement the Comparable interface. After this statement, the value stored in the variable comparison is Assuming the compareTo method is written correctly, what can you say about the relation between the objects object and object
Group of answer choices
object and object are equal
object is less than object
object is greater than object
object and object point to the same object in memory
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
