问题
What is the working style of compareTo(Object o)
method. How the first object of a set is compared? Every time when an object is created the constructor is called and the values are assigned with this
for class variables and the same class variables are compared with Object o
, but, what is o
in this case?
来源:https://stackoverflow.com/questions/39752908/what-is-the-first-current-object-in-compareto-method-in-java-comparable-interf